changeset 5299:093ea25436c7

RT-21415: Need to add javafx-src.zip to JDK 8 distribution Reviewed-by: David Hill, Felipe
author kcr
date Tue, 08 Oct 2013 09:26:09 -0700
parents 61727bf6e832
children ab9489903f7b
files build.gradle gradle.properties.template
diffstat 2 files changed, 47 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Tue Oct 08 09:26:09 2013 -0700
+++ b/build.gradle	Tue Oct 08 09:26:09 2013 -0700
@@ -330,6 +330,10 @@
 }
 ext.BUILD_JAVADOC = buildJavadoc;
 
+// Specifies whether to build the javafx-src bundle
+defineProperty("BUILD_SRC_ZIP", "false")
+ext.IS_BUILD_SRC_ZIP = Boolean.parseBoolean(BUILD_SRC_ZIP)
+
 // Specifies whether to run full tests (true) or smoke tests (false)
 def isFullTest = false;
 if (hasProperty("FULL_TEST")) {
@@ -1814,6 +1818,34 @@
     }
 }
 
+task copySources(type: Copy) {
+    enabled = IS_BUILD_SRC_ZIP
+    def projectsToCopy = [
+            project(":base"), project(":graphics"), project(":controls"),
+            project(":swing"), project(":swt"), project(":fxml"),
+            project(":builders"), project(":web")]
+    from(projectsToCopy.collect({
+        ["${it.projectDir}/src/main/java"]
+    }))
+    include "**/*.java"
+    into "${buildDir}/javafx-src"
+}
+
+task zipSources(type: Zip) {
+    enabled = IS_BUILD_SRC_ZIP
+    dependsOn(copySources)
+    archiveName = "javafx-src.zip"
+    destinationDir = file("$buildDir")
+    includeEmptyDirs = false
+    from "${buildDir}/javafx-src"
+}
+
+task src {
+    enabled = IS_BUILD_SRC_ZIP
+    description = "Created the javafx-src.zip bundle"
+    dependsOn(zipSources)
+}
+
 task all() {
     dependsOn(sdk,publicExports,apps,perf,zips)
 }
@@ -1946,6 +1978,14 @@
                 }
             }
 
+            // Copy over the javafx-src bundle
+            if (IS_BUILD_SRC_ZIP) {
+                copy {
+                    from "build/javafx-src.zip"
+                    into "build/${t.name}-sdk"
+                }
+            }
+
             // Copy over the fxpackager and rename as ant-javafx.jar
             copy {
                 from "modules/fxpackager/build/libs"
@@ -1968,6 +2008,7 @@
         }
         dependsOn(jfxrtTask)
         dependsOn(javadoc)
+        dependsOn(src)
     }
 
     def generateSymbols = targetProperties.containsKey('generateSymbols') ? targetProperties.generateSymbols : false
--- a/gradle.properties.template	Tue Oct 08 09:26:09 2013 -0700
+++ b/gradle.properties.template	Tue Oct 08 09:26:09 2013 -0700
@@ -46,6 +46,12 @@
 
 #BUILD_JAVADOC = true
 
+# The building of the javafx-src bundle takes time. By default we disable the
+# building of javafx-src so as to speed up the time in incremental builds.
+# Uncomment this flag in order to build javafx-src.zip
+
+#BUILD_SRC_ZIP = true
+
 # Specifies whether to do a full test run or a "smoke test" run. By default we
 # do a smoke test run which excludes all tests that show a window or play media.
 # Certain long running tests might also be excluded when this is not set.