1. shemnon
  2. javafx-gradle

Commits

shemnon  committed 7de4503

javaRuntime is only availabe on JDK 8. Add an exception stating as such.

  • Participants
  • Parent commits 78bd958
  • Branches master

Comments (0)

Files changed (1)

File gradle-javafx-plugin/src/main/groovy/org/bitbucket/shemnon/javafxplugin/tasks/JavaFXDeployTask.groovy

View file
                 getLogger().info("Java runtime to be bundled: $runtime")
                 rtFile = new File(runtime)
                 if (!rtFile.exists()) {
-                    throw new GradleException("No Java Runtime found at specified runime path: $runtime")
+                    throw new GradleException("No Java Runtime found at specified runtime path: $runtime")
                 }
             }
-            deployParams.javaRuntimeSource = rtFile
+            try {
+                deployParams.javaRuntimeSource = rtFile
+            } catch (MissingPropertyException ignored) {
+                throw new GradleException ("JavaFXDeployTask.javaRuntime is only available in JavaFX 8 or later, aborting build.")
+            }
         } else {
             getLogger().info("Java runtime to be bundled: the runtime executing the Gradle build")
         }