Commits

shemnon committed 35ae1bb

screw type safety. Usa a big bag-o-stuff for the overrides.

  • Participants
  • Parent commits 740fe01

Comments (0)

Files changed (2)

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

     protected basicExtensionMapping = {prop, convention = null, aware = null ->
         JavaFXPluginExtension ext = project.javafx;
         for (profile in profiles) {
-            JavaFXPluginExtension override = ext.getProfile(profile)
+            Map override = ext.getProfile(profile)
             def val = override[prop]
             if (val != null) {
                 return val;
 
         def jfxrtJarFile = project.files(findJFXJar())
         project.javafx {
-            profileMap = [:]
             jfxrtJar = jfxrtJarFile
             antJavaFXJar = project.files(findAntJavaFXJar())
-            signingMode = 'release'
-            embedLauncher = true
             appName = project.name //FIXME capatalize
             packaging = 'all'
-            width = 1024
-            height = 768
-            embedJNLP = false
-            updateMode = "background"
-            offlineAllowed = true
-            jvmArgs = []
-            systemProperties = [:]
-            arguments = []
-            iconInfos = []
+            signingMode = 'release'
         }
 
 

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

 
     public static final String NO_RUNTIME = '<NO RUNTIME>'
 
-    protected Map<String, JavaFXPluginExtension> profileMap
+    protected Map<String, Map> profileMap = [:]
 
     // preliminaries
     FileCollection jfxrtJar
 
     String signingMode
 
-    boolean embedLauncher
+    boolean embedLauncher = true
 
     // app info
     String id
     String packaging
 
     // JNLP Packaging
-    int width
-    int height
-    boolean embedJNLP
-    String updateMode
-    boolean offlineAllowed
+    int width = 1024
+    int height = 768
+    boolean embedJNLP = false
+    String updateMode = "background"
+    boolean offlineAllowed = true
     String codebase
 
     // runtime stuff
     String mainClass
-    List<String> jvmArgs
-    Map<String, String> systemProperties
-    List<String> arguments
+    List<String> jvmArgs = []
+    Map<String, String> systemProperties = [:]
+    List<String> arguments = []
 
     String javaRuntime
 
     boolean menu
     boolean shortcut
 
-    protected List<IconInfo> iconInfos
+    protected List<IconInfo> iconInfos = []
     protected List<IconInfo> getIconInfos() { return iconInfos}
     protected void setIconInfos(List<IconInfo> icons) {iconInfos = icons}
 
         ConfigureUtil.configure(closure, new MethodToMap(map: profileMap))
     }
 
-    JavaFXPluginExtension getProfile(String profile) {
+    Map getProfile(String profile) {
         return profileMap.get(profile)
     }