41 lines
1.1 KiB
Ruby
41 lines
1.1 KiB
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/v5.2.5/grails-5.2.5.zip"
|
|
sha256 "448d4ed7490e6c86848ceb9416e01c8632208eb3432a6c11634f957a9e944f9e"
|
|
license "Apache-2.0"
|
|
|
|
livecheck do
|
|
url :stable
|
|
regex(/^v?(\d+(?:\.\d+)+)$/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "bad1e57b6b6bdd559e443e54a41fc6da41cfe091a7a50238bd9573373999128c"
|
|
end
|
|
|
|
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", Language::Java.overridable_java_home_env("11")
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
The GRAILS_HOME directory is:
|
|
#{opt_libexec}
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system bin/"grails", "create-app", "brew-test"
|
|
assert_predicate testpath/"brew-test/gradle.properties", :exist?
|
|
assert_match "brew.test", File.read(testpath/"brew-test/build.gradle")
|
|
|
|
assert_match "Grails Version: #{version}", shell_output("#{bin}/grails -v")
|
|
end
|
|
end
|