7d28fa31d8
Kotlin 1.0.1 Closes Homebrew/homebrew#50261. Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
25 lines
819 B
Ruby
25 lines
819 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/1.0.1/kotlin-compiler-1.0.1.zip"
|
|
sha256 "81a854c4910e8b107b341eb47e56874712d09847b35bfc8af00513ffa48e8dc3"
|
|
|
|
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
|