homebrew-core/Formula/kotlin.rb
Oleksandr Tyshkovets 81744343cb kotlin 1.0.0-beta-4589
Closes Homebrew/homebrew#48516.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-27 18:59:32 +01:00

26 lines
873 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/build-1.0.0-beta-4589/kotlin-compiler-1.0.0-beta-4589.zip"
version "1.0.0-beta-4589"
sha256 "021f385ec14e1ef2863d6749433a561a0fc5b08811420c4cbb20ed1678538e10"
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