Commits

shemnon committed b499614

convention configuration improvements

Comments (0)

Files changed (2)

plugin/src/main/groovy/com/bitbucket/shemnon/javafxplugin/JavaFXPlugin.groovy

         configureConfigurations(project.configurations)
 
         def jfxrtJarFile = project.files(findJFXJar())
-        project.configure(project) {
-
-            convention.plugins.javafx = new JavaFXPluginConvention(project, {
+        project.convention.plugins.javafx = new JavaFXPluginConvention(project, {
                 jfxrtJar = jfxrtJarFile
-                antJavaFXJar = files(findAntJavaFXJar())
+                antJavaFXJar = project.files(findAntJavaFXJar())
                 javafxMainClass = "${project.group}${(project.group&&project.name)?'.':''}${project.name}${(project.group||project.name)?'.':''}Main"
                 appName = project.name //FIXME capatalize
                 packaging = 'all'
                     sigfile = 'JavaFXDebug'
                 }
             })
-        }
+
 
         project.dependencies {
             providedCompile jfxrtJarFile

plugin/src/main/groovy/com/bitbucket/shemnon/javafxplugin/JavaFXPluginConvention.groovy

         releaseKey = new SigningKeyInfo(closure)
     }
 
+    def javafx(Closure closure) {
+        closure.delegate = this
+        closure()
+    }
+
 }
 
 class SigningKeyInfo {