closure-compiler: requires Java 7

Closes Homebrew/homebrew#27938.
This commit is contained in:
Adam Vandenberg 2014-04-08 20:39:28 -07:00
parent 1874cb2c8e
commit 3179e6d69e

View file

@ -1,5 +1,17 @@
require 'formula'
class Java7 < Requirement
fatal true
def satisfied?
`java -version`.split("\n")[0] =~ /"1\.7/
end
def message
"Java 7 is required."
end
end
class ClosureCompiler < Formula
homepage 'http://code.google.com/p/closure-compiler/'
url 'https://code.google.com/p/closure-compiler/', :using => :git, :tag => 'v20140303'
@ -7,6 +19,7 @@ class ClosureCompiler < Formula
head 'https://code.google.com/p/closure-compiler/', :using => :git
depends_on :ant
depends_on Java7
def install
system "ant", "clean"