Skip to content

Instantly share code, notes, and snippets.

@YusukeIwaki
Created December 2, 2016 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YusukeIwaki/9799b3680d099edecfa26f01ad992b68 to your computer and use it in GitHub Desktop.
Save YusukeIwaki/9799b3680d099edecfa26f01ad992b68 to your computer and use it in GitHub Desktop.
kotlin-1.1-M03をインストールするためのFormula
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