homebrew-core/Formula/kotlin.rb
Igor Kapkov ed012c2829
kotlin 1.3.41
Closes #41605.

Signed-off-by: Chongyu Zhu <i@lembacon.com>
2019-07-04 15:13:21 +08:00

26 lines
858 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.41/kotlin-compiler-1.3.41.zip"
sha256 "c44ab6866895606e408b60934ebe45d4befcbc33ea0e4ea73c4b3b89ad770132"
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