2016-01-04 14:56:44 +00:00
|
|
|
class Kotlin < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Statically typed programming language for the JVM"
|
2015-10-17 08:05:44 +00:00
|
|
|
homepage "https://kotlinlang.org/"
|
2016-02-15 19:19:37 +00:00
|
|
|
url "https://github.com/JetBrains/kotlin/releases/download/build-1.0.0/kotlin-compiler-1.0.0.zip"
|
|
|
|
sha256 "fedd9904611262b89e9f479ba36616bc9b6eac5f1121229fb663eb3296aae536"
|
2015-04-30 16:18:16 +00:00
|
|
|
|
2015-10-23 12:01:36 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2015-04-30 16:18:16 +00:00
|
|
|
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
|