< prev index next >
./build.gradle
Print this page
rev 10048 : 8166570: separate building of ant-javafx.jar from fxpackager proper
Reviewed-by: kcr
@@ -1969,10 +1969,21 @@
}
tasks.all {
if (!COMPILE_FXPACKAGER) it.enabled = false
}
+ sourceSets {
+ main
+ antplugin {
+ java {
+ compileClasspath += main.output
+ runtimeClasspath += main.output
+ }
+ }
+ test
+ }
+
// fxpackager has a dependency on ant in order to build the ant jar,
// and as such needs to point to the apache binary repository
if (!BUILD_CLOSED) {
repositories {
maven {
@@ -1980,29 +1991,37 @@
}
}
}
dependencies {
- compile group: "org.apache.ant", name: "ant", version: "1.8.2"
compile project(":fxpackagerservices")
+ antpluginCompile group: "org.apache.ant", name: "ant", version: "1.8.2"
testCompile project(":controls")
}
- // When producing the jar, we need to relocate a few class files
+ // When producing the ant-javafx.jar, we need to relocate a few class files
// from their normal location to a resources/classes or resources/web-files
// location
- jar {
+ task antpluginJar(type: Jar, dependsOn: [ compileJava, jar, compileAntpluginJava ]) {
includeEmptyDirs = false
archiveName = "ant-javafx.jar"
- includes = ["com/sun/javafx/tools/ant/**", "com/javafx/main/**", "resources/web-files/**"]
+
+ from (sourceSets.antplugin.output) {
eachFile { FileCopyDetails details ->
if (details.path.startsWith("com/javafx/main")) {
details.path = "resources/classes/$details.path"
}
}
}
+ from (sourceSets.main.output.resourcesDir) {
+ includes = [ "resources/web-files/**", "com/sun/javafx/tools/ant/antlib.xml" ]
+ }
+ }
+
+ assemble.dependsOn(antpluginJar)
+
// The "man" task will create a $buildDir/man containing the man
// files for the system being built
task man(type: Copy) {
includeEmptyDirs = false
enabled = (IS_LINUX || IS_MAC) && COMPILE_FXPACKAGER
< prev index next >