homebrew-core/Formula/gradle.rb
2017-08-11 14:04:44 -07:00

24 lines
754 B
Ruby

class Gradle < Formula
desc "Build system based on the Groovy language"
homepage "https://www.gradle.org/"
url "https://services.gradle.org/distributions/gradle-4.1-all.zip"
sha256 "5c07b3bac2209fbc98fb1fdf6fd831f72429cdf8c503807404eae03d8c8099e5"
bottle :unneeded
option "with-all", "Installs Javadoc, examples, and source in addition to the binaries"
depends_on :java => "1.7+"
def install
rm_f Dir["bin/*.bat"]
libexec.install %w[bin lib]
libexec.install %w[docs media samples src] if build.with? "all"
(bin/"gradle").write_env_script libexec/"bin/gradle", Language::Java.overridable_java_home_env
end
test do
ENV.java_cache
assert_match version.to_s, shell_output("#{bin}/gradle --version")
end
end