homebrew-core/Formula/kotlin-compiler.rb
Shoichi Matsuda c39a03ebdd kotlin-compiler 1.0.0-beta-2423
Update kotlin-compiler version

Closes Homebrew/homebrew#46102.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-11-18 18:20:12 +00:00

26 lines
881 B
Ruby

class KotlinCompiler < Formula
desc "Statically typed programming language for the JVM"
homepage "https://kotlinlang.org/"
url "https://github.com/JetBrains/kotlin/releases/download/build-1.0.0-beta-2423/kotlin-compiler-1.0.0-beta-2423.zip"
sha256 "130c7dbcaeb269e4d3e11021264e4cc6e9d202e5e54a0810ed2648da827bf3f3"
version "1.0.0-beta-2423"
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