Commits

shemnon committed fedb5e7

add resources to jar, to solve Java7 classpath issues with multiple jars, see Ensemble on Windows

Comments (0)

Files changed (2)

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

         task.conventionMapping.outputFile = {convention, aware ->
             "$project.libsDir/${project.archivesBaseName}.jar" as File}
 
-        task.conventionMapping.inputFiles = {convention, aware ->
+        task.conventionMapping.inputFiles = {convention, aware -> convention.getPlugin(JavaPluginConvention).sourceSets.main.output}
+        task.conventionMapping.resources = {convention, aware ->
             FileCollection compileClasspath = project.convention.getPlugin(JavaPluginConvention).sourceSets[SourceSet.MAIN_SOURCE_SET_NAME].compileClasspath;
             Configuration providedCompile = project.configurations[PROVIDED_COMPILE_CONFIGURATION_NAME];
-            FileCollection output = convention.getPlugin(JavaPluginConvention).sourceSets.main.output
-            compileClasspath + output - providedCompile;
+            FileCollection output =
+            compileClasspath - providedCompile;
         }
 
         task.dependsOn(project.tasks.getByName("cssToBin"))

plugin/src/main/groovy/com/bitbucket/shemnon/javafxplugin/tasks/JavaFXJarTask.groovy

                     //FIXME preloader
                     //FIXME fallback
             )
+            ant.resources {
+                getResources().filter { it.file } each {
+                    fileset(file: it)
+                }
+            }
         }
     }
 
     File outputFile
 
     @InputFiles
+    FileCollection resources
+
+    @InputFiles
     FileCollection inputFiles
 }