aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Rakefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index a3dc51aa..1b443e2b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -273,14 +273,22 @@ def path_to(filename)
end
+##
+# returns the 32-bit mode force flags for java compiler if supported, this makes the build much
+# faster
+#
+def java32flags
+ return '-d32 -client' unless Rake::Win32.windows? || `java -version -d32 2>&1`.match(/Error/i)
+end
+
+
def closure_compile(filename)
puts "Minifying #{filename} ..."
min_path = path_to(filename.gsub(/\.js$/, '.min.js'))
%x(java \
- -client \
- -d32 \
+ #{java32flags()} \
-jar lib/closure-compiler/compiler.jar \
--compilation_level SIMPLE_OPTIMIZATIONS \
--language_in ECMASCRIPT5_STRICT \