class Kotlin < Formula desc "Statically typed programming language for the JVM" homepage "https://kotlinlang.org/" url "https://github.com/JetBrains/kotlin/releases/download/v1.1.3/kotlin-compiler-1.1.3.zip" sha256 "bf5e6d8f1fa93a1fc27c56de3256cc94f26de483e8dd7fefc1b07758e2171dc9" 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) { 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