homebrew-core/Formula/mill.rb
Igor Kapkov 3c1ae476ce
mill 0.3.3
Closes #33727.

Signed-off-by: Chongyu Zhu <i@lembacon.com>
2018-11-05 12:48:52 +08:00

28 lines
784 B
Ruby

class Mill < Formula
desc "Scala build tool"
homepage "https://www.lihaoyi.com/mill/"
url "https://github.com/lihaoyi/mill/releases/download/0.3.3/0.3.3"
sha256 "0360ff898978e30d987d2c5258522fdf21fb158af859f96c24be18fd9ff0704f"
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