aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2014-04-08 20:39:28 -0700
committerAdam Vandenberg2014-04-08 20:48:24 -0700
commit8bca3b24ea4256444fadc78f67d3a7eb9ad3b63d (patch)
tree8d9a098903df7c55d135d4cbfdc65b4db67f1360 /Library
parent37c512e279d6185745c8ce26d97519eb471e8fae (diff)
downloadhomebrew-8bca3b24ea4256444fadc78f67d3a7eb9ad3b63d.tar.bz2
closure-compiler: requires Java 7
Closes #27938.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/closure-compiler.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Formula/closure-compiler.rb b/Library/Formula/closure-compiler.rb
index 1bbe9d02c..ba597669f 100644
--- a/Library/Formula/closure-compiler.rb
+++ b/Library/Formula/closure-compiler.rb
@@ -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"