homebrew-core/Formula/grails.rb

30 lines
796 B
Ruby

class Grails < Formula
desc "Web application framework for the Groovy language"
homepage "https://grails.org"
url "https://github.com/grails/grails-core/releases/download/v4.0.4/grails-4.0.4.zip"
sha256 "2b1bbe93f931bf6eab468575c40e6582881e6c3a3b6b2fb4aee6ad685fa2dcb6"
license "Apache-2.0"
bottle :unneeded
depends_on "openjdk@11"
def install
rm_f Dir["bin/*.bat", "bin/cygrails", "*.bat"]
libexec.install Dir["*"]
bin.install Dir["#{libexec}/bin/*"]
bin.env_script_all_files libexec/"bin", JAVA_HOME: "${JAVA_HOME:-#{Formula["openjdk@11"].opt_prefix}}"
end
def caveats
<<~EOS
The GRAILS_HOME directory is:
#{opt_libexec}
EOS
end
test do
assert_match "Grails Version: #{version}", shell_output("#{bin}/grails -v")
end
end