homebrew-core/Formula/mill.rb
ilovezfs d0574a63a3 mill 0.2.0
Closes #26462.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
2018-04-11 09:17:38 +02:00

28 lines
804 B
Ruby

class Mill < Formula
desc "Scala build tool"
homepage "https://www.lihaoyi.com/mill/"
url "https://github.com/lihaoyi/mill/releases/download/0.2.0/0.2.0", :using => :nounzip
sha256 "7a033b87e8132eeea040d61c114bf192215a21656b1b3ea563f019d1350ebe7f"
bottle :unneeded
depends_on :java => "1.8"
def install
libexec.install Dir["*"].shift => "mill"
chmod 0555, libexec/"mill"
(bin/"mill").write_env_script libexec/"mill", Language::Java.java_home_env("1.8")
end
test do
(testpath/"build.sc").write <<~EOS
import mill._
import mill.scalalib._
object foo extends ScalaModule {
def scalaVersion = "2.12.4"
}
EOS
output = shell_output("#{bin}/mill resolve __.compile")
assert_equal "foo.compile", output.lines.last.chomp
end
end