class Kotlin < Formula desc "Statically typed programming language for the JVM" homepage "https://kotlinlang.org/" url "https://github.com/JetBrains/kotlin/releases/download/v1.3.11/kotlin-compiler-1.3.11.zip" sha256 "03de0f1a4b49d36433e60ae495982f046782eb3725e6e22a04e24ef38be9a409" bottle :unneeded def install libexec.install "bin", "build.txt", "lib" rm Dir["#{libexec}/bin/*.bat"] bin.install_symlink Dir["#{libexec}/bin/*"] prefix.install "license" end test do (testpath/"test.kt").write <<~EOS 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