Commits

shemnon committed 200ffa4

Allow java runtime to be specified. i.e. build with JDK8 but ship with JDK7, or vice versa

Comments (1)

Files changed (4)

gradle-javafx-plugin/src/main/groovy/org/bitbucket/shemnon/javafxplugin/JavaFXPlugin.groovy

                 'iconInfos',
                 'id',
                 'installSystemWide',
+                'javaRuntime',
                 'jvmArgs',
                 'licenseType',
                 'mainClass',

gradle-javafx-plugin/src/main/groovy/org/bitbucket/shemnon/javafxplugin/JavaFXPluginExtension.groovy

     Map<String, String> systemProperties = [:]
     List<String> arguments = []
 
+    File javaRuntime
+
     // deploy/info attributes
     String category
     String copyright

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

     Map<String, String> systemProperties = [:]
     List<String> arguments = []
 
+    File javaRuntime
+
     // deploy/info attributes
     String category
     String copyright
         getSystemProperties().each {k, v -> deployParams.addJvmProperty(k, v)}
         deployParams.arguments = getArguments()
 
+        if (getJavaRuntime() != null) {
+            deployParams.javaRuntimeSource = getJavaRuntime()
+        }
+
         File packageResourcesOutput = project.sourceSets['package'].output.resourcesDir
         processIcons(packageResourcesOutput)
 

samples/FullyExpressed/build.gradle

     windows {
         id = 'c533f663-1efd-489f-b910-4c7ec20c7fd0'
         category='JavaFX Demos'
+        javaRuntime = file('C:/Program Files (x86)/Java/jdk1.7.0_21')
     }
 
     macosx {
         id = 'net.java.openjdk.openjfx.Ensemble2'
         category = 'public.app-category.developer-tools'
+        javaRuntime = file('/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/')
     }
 
     linux {
         // linux doesn't care about id, it goes un-used at the moment
         category='Development'
+        javaRuntime='/usr/lib/jvm/java-7-oracle'
     }
 
     debugKey {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.