Created
December 2, 2016 13:06
-
-
Save YusukeIwaki/9799b3680d099edecfa26f01ad992b68 to your computer and use it in GitHub Desktop.
kotlin-1.1-M03をインストールするためのFormula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Kotlin < Formula | |
desc "Statically typed programming language for the JVM" | |
homepage "https://kotlinlang.org/" | |
url "https://github.com/JetBrains/kotlin/releases/download/v1.1-M03/kotlin-compiler-1.1-M03.zip" | |
sha256 "55f630899df71894d01f1b25a048bbcc592e28e2545f955eb1034be0eb12c1a7" | |
bottle :unneeded | |
def install | |
libexec.install %w[bin lib] | |
rm Dir["#{libexec}/bin/*.bat"] | |
bin.install_symlink Dir["#{libexec}/bin/*"] | |
end | |
test do | |
(testpath/"test.kt").write <<-EOS.undent | |
fun main(args: Array<String>) { | |
println("Hello World!") | |
} | |
EOS | |
system "#{bin}/kotlinc", "test.kt", "-include-runtime", "-d", "test.jar" | |
system "#{bin}/kotlinc-js", "test.kt", "-output", "test.js" | |
system "#{bin}/kotlinc-jvm", "test.kt", "-include-runtime", "-d", "test.jar" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment