gradle: set GRADLE_HOME in wrapper script. (#1543)

Also, cleanup the test a little.

As mentioned in #889.
This commit is contained in:
Mike McQuaid 2016-05-30 11:17:14 +01:00
parent 4d459925c2
commit 47b5ace4b6

View file

@ -12,14 +12,16 @@ class Gradle < Formula
bottle :unneeded
depends_on :java => "1.6+"
def install
libexec.install %w[bin lib]
bin.install_symlink libexec+"bin/gradle"
(bin/"gradle").write_env_script libexec/"bin/gradle",
Language::Java.java_home_env.merge(:GRADLE_HOME => libexec)
end
test do
ENV.java_cache
output = shell_output("#{bin}/gradle --version")
assert_match /Gradle #{version}/, output
assert_match(/Gradle #{version}/, shell_output("#{bin}/gradle --version"))
end
end