closure-compiler: depend on openjdk

master
Markus Reiter 2020-02-06 01:42:44 +01:00 committed by Alexander Bayandin
parent ea4224e3e9
commit 4c87db002b
1 changed files with 6 additions and 2 deletions

View File

@ -3,14 +3,18 @@ class ClosureCompiler < Formula
homepage "https://github.com/google/closure-compiler"
url "https://search.maven.org/remotecontent?filepath=com/google/javascript/closure-compiler/v20200204/closure-compiler-v20200204.jar"
sha256 "2cabfd9d43019d6e76c081a3e2a355d85600576b485123f4a0ee46a85c75ae30"
revision 1
bottle :unneeded
depends_on :java => "1.7+"
depends_on "openjdk"
def install
libexec.install Dir["*"]
bin.write_jar_script libexec.children.first, "closure-compiler"
(bin/"closure-compiler").write <<~EOS
#!/bin/bash
exec "#{Formula["openjdk"].opt_bin}/java" -jar "#{libexec.children.first}" "$@"
EOS
end
test do