Commits

Anonymous committed 127f8be

refine version checking

Comments (0)

Files changed (1)

gradle-javafx-plugin/build.gradle

 }
 // check for 8u20
 def matcher = System.getProperty("java.runtime.version") =~ /(\d*)\.(\d*)\.(\d*)(_(\d*))?(\D.*)/
-if (matcher.matches() && Integer.parseInt(matcher.group(5)) < 20) {
-    throw new GradleException("Must Build with Java 1.8 update 20 or later")
+if (matcher?.matches() && (!matcher?.group(5) || Integer.parseInt(matcher?.group(5)) < 20)) {
+    throw new GradleException("Must Build with Java 8 update 20 or later")
 }
 
 repositories {