29bb92e028
Kotlin M14 Closes Homebrew/homebrew#44509. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
23 lines
818 B
Ruby
23 lines
818 B
Ruby
class KotlinCompiler < Formula
|
|
desc "Statically typed programming language for the JVM"
|
|
homepage "http://kotlinlang.org/"
|
|
url "https://github.com/JetBrains/kotlin/releases/download/build-0.14.449/kotlin-compiler-0.14.449.zip"
|
|
sha256 "bbb55c84669b6d920dc89beab811b26dfbdbeb95d71e1d6d3384fbfbcd48ec70"
|
|
|
|
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
|