homebrew-core/Formula/kotlin.rb
Jeremy Mailen a6c6c9c63d kotlin 1.1
Closes #10489.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
2017-03-01 23:46:04 +01:00

25 lines
816 B
Ruby

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/kotlin-compiler-1.1.zip"
sha256 "aa44db28bf3ccdae8842b6b92bec5991eb430a80e580aafbc6a044678a2f359d"
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