homebrew-core/Formula/kotlin.rb
Tommy Yang f9e12c1344 kotlin 1.3.21
Closes #36867.

Signed-off-by: Jan Viljanen <527069+javian@users.noreply.github.com>
2019-02-10 09:27:16 +01: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.21/kotlin-compiler-1.3.21.zip"
sha256 "dbc7fbed67e0fa9a2f2ef6efd89fc1ef8d92daa38bb23c1f23914869084deb56"
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