Source

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

Diff from to

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

         def task = project.tasks.replace("jfxJar", JavaFXJarTask)
         task.description = "Adds JavaFX specific packaging to the jar."
         task.group = 'Build'
-        task.dependsOn = ['jar']
         
         project.afterEvaluate {
             project.configurations.archives.artifacts*.builtBy task
+            task.dependsOn = [sourceSet(project).jarTaskName]
         }
 
         [
         task.conventionMapping.mainClass = mainClassConvention
 
         task.conventionMapping.jarFile = {convention, aware ->
-            project.tasks.getByName("jar").archivePath
+            project.tasks.getByName(sourceSet(project).jarTaskName).archivePath
         }
         task.conventionMapping.classpath = {convention, aware ->
             FileCollection compileClasspath = sourceSet(project).compileClasspath;