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.61/kotlin-compiler-1.2.61.zip" sha256 "be6d45385029ae99dee38fc77f554bddd49761067a532bfbf6bbf1b7348d5bbf" 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