ecf00676ed
Update to the official 1.0.0 version Closes Homebrew/homebrew#49193. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
25 lines
825 B
Ruby
25 lines
825 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/build-1.0.0/kotlin-compiler-1.0.0.zip"
|
|
sha256 "fedd9904611262b89e9f479ba36616bc9b6eac5f1121229fb663eb3296aae536"
|
|
|
|
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
|