changeset 4018:983af42d54d0

RT-30503: Gradle: need update-cache task to support closed builds Also some minor whitespace typo fixes.
author Richard Bair <richard.bair@oracle.com>
date Thu, 20 Jun 2013 09:21:12 -0700
parents 3bcb92caeb77
children 86a1b36090e4
files build.gradle
diffstat 1 files changed, 23 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Thu Jun 20 16:21:49 2013 +0100
+++ b/build.gradle	Thu Jun 20 09:21:12 2013 -0700
@@ -268,7 +268,11 @@
 defineProperty("JAVAH", cygpath("$JDK_HOME/bin/javah${IS_WINDOWS ? '.exe' : ''}"))
 defineProperty("JAVADOC", cygpath("$JDK_HOME/bin/javadoc${IS_WINDOWS ? '.exe' : ''}"))
 defineProperty("JDK_DOCS", "http://download.oracle.com/javase/7/docs/api")
-defineProperty("BINARY_STUB", cygpath("$JDK_HOME/jre/lib/ext/jfxrt.jar"))
+defineProperty("STUB_RUNTIME", "$JDK_HOME/jre")
+defineProperty("BINARY_STUB", cygpath("$STUB_RUNTIME/lib/ext/jfxrt.jar"))
+defineProperty("LIBRARY_STUB", IS_MAC ? cygpath("$STUB_RUNTIME/lib") :
+                               IS_WINDOWS ? cygpath("$STUB_RUNTIME/bin") :
+                               cygpath("$STUB_RUNTIME/lib/$OS_ARCH"))
 ext.BINARY_STUB = "".equals(BINARY_STUB) ? null : files(BINARY_STUB)
 
 // COMPILE_WEBKIT specifies whether to build all of webkit. COMPILE_GSTREAMER
@@ -349,21 +353,19 @@
 
 /**
  * Fetch/Check that external tools are present for the build. This method
- * will conditionaly download the packages from project defined ivy repositories
+ * will conditionally download the packages from project defined ivy repositories
  * and unpack them into the specified destdir
  *
- * @param configName A unique name to distiguish the configuration (ie "ARMSFV6")
- * @param packages A list of required packages (with extentions .tgz, .zip)
+ * @param configName A unique name to distinguish the configuration (ie "ARMSFV6")
+ * @param packages A list of required packages (with extensions .tgz, .zip)
  * @param destdir where the packages should be unpacked
  * @param doFetch if true, the named packages will be download
  */
 void fetchExternalTools(String configName, List packages, File destdir, boolean doFetch) {
-
-
     if (doFetch) {
-        // create a uniuqe configuration for this fetch
-        def String thisconfig = "fetchTools$configName"
-        rootProject.configurations.create(thisconfig)
+        // create a unique configuration for this fetch
+        def String fetchToolsConfig = "fetchTools$configName"
+        rootProject.configurations.create(fetchToolsConfig)
 
         def List<String> fetchedPackages = []
         def int fetchCount = 0
@@ -377,7 +379,7 @@
             def File pkgdir = file("$destdir/$basename-$ver")
 
             if (!pkgdir.isDirectory()) {
-                rootProject.dependencies.add(thisconfig, "javafx:$basename:$ver", {
+                rootProject.dependencies.add(fetchToolsConfig, "javafx:$basename:$ver", {
                     artifact {
                         name = basename
                         version = ver
@@ -390,19 +392,17 @@
             }
         }
 
-
         //fetch all the missing packages
         if (fetchedPackages.size > 0) {
             destdir.mkdirs()
 
             logger.quiet "fetching missing packages $fetchedPackages"
             copy {
-                from rootProject.configurations[thisconfig]
+                from rootProject.configurations[fetchToolsConfig]
                 into destdir
             }
 
             // unpack the fetched packages
-
             fetchedPackages.each { pkgname->
                 logger.quiet "expanding the package $pkgname"
                 def srcball = file("${destdir}/${pkgname}")
@@ -422,12 +422,12 @@
                             workingDir pkgdir
                             commandLine "tar", "zxf", "${srcball}"
                          }
-                     } else {
-                         copy {
-                             from tarTree(resources.gzip("${srcball}"))
-                             into pkgdir
-                         }
-                     }
+                    } else {
+                        copy {
+                            from tarTree(resources.gzip("${srcball}"))
+                            into pkgdir
+                        }
+                    }
                 } else if (pkgname.endsWith(".zip")) {
                      copy {
                          from zipTree("${srcball}")
@@ -461,7 +461,7 @@
 }
 
 // Now we need to define the native compilation tasks. The set of parameters to
-// native compiliation depends on the target platform (and also to some extent what platform
+// native compilation depends on the target platform (and also to some extent what platform
 // you are compiling on). These settings are contained in various gradle files
 // such as mac.gradle and linux.gradle and armhf.gradle. Additionally, the developer
 // can specify COMPILE_FLAGS_FILE to be a URL or path to a different gradle file
@@ -597,9 +597,9 @@
  *    - CCTask compiles native code. Specifically it will compile .m, .c,     *
  *      .cpp, or .cc files. It uses the headers provided by the               *
  *      JavaHeaderTask plus additional platform specific headers. It will     *
- *      compile into .obj files.                       *
+ *      compile into .obj files.                                              *
  *    - LinkTask will perform native linking and create the .dll / .so /      *
- *      .dylib as necessary.
+ *      .dylib as necessary.                                                  *
  *                                                                            *
  *****************************************************************************/
 
@@ -737,7 +737,7 @@
 
 allprojects {
     // We want to configure all projects as java projects and use the same compile settings
-    // etc, except for the root project which we just want to ignore
+    // etc, except for the root project which we just want to ignore (and for now media and web...)
     if (project == rootProject || project.name == "media" || project.name == "web") return
     // All of our projects are java projects
     apply plugin: "java"