homebrew-core/Formula/mill.rb

29 lines
804 B
Ruby
Raw Normal View History

2018-03-10 18:14:26 +00:00
class Mill < Formula
desc "Scala build tool"
homepage "https://www.lihaoyi.com/mill/"
2018-03-14 06:27:13 +00:00
url "https://github.com/lihaoyi/mill/releases/download/0.1.6/0.1.6", :using => :nounzip
sha256 "13fa2ff516daf5ad154b810fdb8d8a762cfb31e7e903583d5335bebc6f18c343"
2018-03-10 18:14:26 +00:00
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