d5e19432ec
Closes #31651. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
28 lines
784 B
Ruby
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.2.7/0.2.7"
|
|
sha256 "804429a926b22d2a9ab81117dba55800cc24bf70a3213e5230efc99f317c3c3b"
|
|
|
|
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
|