homebrew-core/Formula/kotlin.rb
Chongyu Zhu c62fddbae7 kotlin 1.3.0
Closes #33518.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
2018-10-30 17:16:52 +01:00

26 lines
856 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.3.0/kotlin-compiler-1.3.0.zip"
sha256 "ff851cb84dd12df6078ae1f4a5424de9be6dcb4ac578b35455eeb7106dc52592"
bottle :unneeded
def install
libexec.install "bin", "build.txt", "lib"
rm Dir["#{libexec}/bin/*.bat"]
bin.install_symlink Dir["#{libexec}/bin/*"]
prefix.install "license"
end
test do
(testpath/"test.kt").write <<~EOS
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