homebrew-core/Formula/kotlin-compiler.rb
Chen Xu 03514b1744 kotlin-compiler 1.0.0-beta-1103
Closes Homebrew/homebrew#45630.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-11-02 21:06:08 -08:00

26 lines
881 B
Ruby

class KotlinCompiler < 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-1103/kotlin-compiler-1.0.0-beta-1103.zip"
sha256 "7636819143d5c7332f5fa5c29c1b7701c861ae6541e02a1ccae10af6ac90c980"
version "1.0.0-beta-1103"
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