gradle: set GRADLE_HOME in wrapper script. (#1543)
Also, cleanup the test a little. As mentioned in #889.
This commit is contained in:
parent
4d459925c2
commit
47b5ace4b6
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue