Commits

shemnon committed bfbe011

add package info to native bundling

Comments (0)

Files changed (3)

brickbreaker/build.gradle

     dependencies {
         classpath 'com.bitbucket.shemnon.javafxplugin:plugin:0.0.0-SNAPSHOT'
     }
-}
+}

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

         project.dependencies {
             providedCompile jfxrtJarFile
         }
-//        project.tasks.getByName("task").dependsOn("othertask")
+        project.sourceSets {
+            'package' {
+                resourcesDir = 'src/main'
+            }
+        }
 
         configureJFXDeployTask(project)
         configureJavaFXJarTask(project)

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

 import org.gradle.api.tasks.InputFiles
 import org.gradle.api.tasks.TaskAction
 import org.gradle.api.tasks.OutputDirectory
-import org.gradle.api.tasks.OutputFile
-import org.gradle.process.internal.ExecAction
-import org.gradle.process.internal.DefaultExecAction
-import org.gradle.process.ExecResult
 import org.gradle.api.internal.ConventionTask
 import org.gradle.api.file.FileCollection
 
     processResources() {
         ant.taskdef(name: 'fxDeploy',
                 classname: 'com.sun.javafx.tools.ant.DeployFXTask',
-                classpath: getAntJavaFXJar().asPath)
+                classpath: (getAntJavaFXJar() + project.files(project.sourceSets.'package'.resourcesDir)).asPath)
 
         ant.fxDeploy(
                 //width:
             )
 
             permissions(elevated: 'true')
-
-//            <fx:deploy width="${applet.width}" height="${applet.height}"
-//            outdir="${basedir}/${dist.dir}" embedJNLP="true"
-//            outfile="${application.title}">
-//
-//            <fx:application refId="sampleApp"/>
-//
-//            <fx:resources refid="appRes"/>
-//
-//            <fx:info title="Sample app: ${application.title}"
-//            vendor="${application.vendor}"/>
-//
-//            <-- Request elevated permissions -->
-//            <fx:permissions elevate="true"/>
-//            </fx:deploy>
-
         }
     }