37977bbc57
Closes #25673. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
25 lines
829 B
Ruby
25 lines
829 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.2.31/kotlin-compiler-1.2.31.zip"
|
|
sha256 "da99c6ba77a5222955292eafbfe8459a4696960ef8e5585cbe71cee49cdc8026"
|
|
|
|
bottle :unneeded
|
|
|
|
def install
|
|
libexec.install "bin", "build.txt", "lib"
|
|
rm Dir["#{libexec}/bin/*.bat"]
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
|
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
|