37 lines
1.0 KiB
Ruby
37 lines
1.0 KiB
Ruby
class Mill < Formula
|
|
desc "Scala build tool"
|
|
homepage "https://com-lihaoyi.github.io/mill/mill/Intro_to_Mill.html"
|
|
url "https://github.com/com-lihaoyi/mill/releases/download/0.10.10/0.10.10-assembly"
|
|
sha256 "41e9f7cf6a9b8321c7614b1c061ed475cd7f73cd960cb9c322c64917eb5c4793"
|
|
license "MIT"
|
|
|
|
livecheck do
|
|
url :stable
|
|
regex(/^v?(\d+(?:\.\d+)+)$/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "e1182750e49b19a6d5037c3ec7e50a4add6e22e18a013a30c79dc9f2d94d52fa"
|
|
end
|
|
|
|
depends_on "openjdk"
|
|
|
|
def install
|
|
libexec.install Dir["*"].shift => "mill"
|
|
chmod 0555, libexec/"mill"
|
|
(bin/"mill").write_env_script libexec/"mill", Language::Java.overridable_java_home_env
|
|
end
|
|
|
|
test do
|
|
(testpath/"build.sc").write <<~EOS
|
|
import mill._
|
|
import mill.scalalib._
|
|
object foo extends ScalaModule {
|
|
def scalaVersion = "2.12.8"
|
|
}
|
|
EOS
|
|
output = shell_output("#{bin}/mill resolve __.compile")
|
|
assert_equal "foo.compile", output.lines.last.chomp
|
|
end
|
|
end
|