changeset 5877:24c413e47bd9

RT-30501: Gradle build script must read version and milestone info from build.properties
author kcr
date Mon, 02 Dec 2013 21:03:40 -0800
parents 2ae4bdb4a966
children 76c09d14cfbd
files build.gradle gradle.properties.template
diffstat 2 files changed, 17 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Mon Dec 02 20:18:24 2013 -0800
+++ b/build.gradle	Mon Dec 02 21:03:40 2013 -0800
@@ -369,13 +369,18 @@
 // Define the number of threads to use when compiling (specifically for native compilation)
 defineProperty("NUM_COMPILE_THREADS", "${Runtime.runtime.availableProcessors()}")
 
-// Define settings used when creating the VersionInfo. These settings are generally left alone
-// by developers and set only from Hudson. We have to manually rev this version number from
-// release to release.
 //
+// The next three sections of properties are used to generate the
+// VersionInfo class, and the Windows DLL manifest.
+//
+
+// The following properties should be left alone by developers and set only from Hudson.
 defineProperty("HUDSON_JOB_NAME", "not_hudson")
 defineProperty("HUDSON_BUILD_NUMBER","0000")
 defineProperty("PROMOTED_BUILD_NUMBER", "00")
+
+// The following properties define the product name for Oracle JDK and OpenJDK
+// for VersionInfo and the DLL manifest.
 if (BUILD_CLOSED) {
     defineProperty("PRODUCT_NAME", "Java(TM)")
     defineProperty("COMPANY_NAME", "Oracle Corporation")
@@ -385,11 +390,14 @@
     defineProperty("COMPANY_NAME", "N/A")
     defineProperty("PLATFORM_NAME", "Platform")
 }
-// TODO: set the values of RAW_VERSION, RELEASE_NAME, and RELEASE_MILESTONE based on the
-// settings in build.properties
-defineProperty("RAW_VERSION", "8.0.0")
-defineProperty("RELEASE_NAME", "8.0")
-defineProperty("RELEASE_MILESTONE", "ea")
+
+// The following properties are set based on properties defined in
+// build.properties. The release number or milestone number should be updated
+// in that file.
+def jfxReleaseVersion = "${jfxReleaseMajorVersion}.${jfxReleaseMinorVersion}.${jfxReleaseMicroVersion}"
+defineProperty("RAW_VERSION", jfxReleaseVersion)
+defineProperty("RELEASE_NAME", jfxReleaseName)
+defineProperty("RELEASE_MILESTONE", jfxReleaseMilestone)
 
 // Check whether the COMPILE_TARGETS property has been specified (if so, it was done by
 // the user and not by this script). If it has not been defined then default
--- a/gradle.properties.template	Mon Dec 02 20:18:24 2013 -0800
+++ b/gradle.properties.template	Mon Dec 02 21:03:40 2013 -0800
@@ -222,16 +222,12 @@
 #COMPILE_FLAGS_FILES = path/to/flags/file.gradle, path/to/flags/file2.gradle
 
 # Define settings used when creating the VersionInfo. These settings are generally left alone
-# by developers and set only from Hudson. We have to manually rev this version number from
-# release to release.
+# by developers and set only from Hudson.
 
 #HUDSON_JOB_NAME = not_hudson
 #HUDSON_BUILD_NUMBER = 0000
 #PROMOTED_BUILD_NUMBER = 00
 #PRODUCT_NAME = OpenJFX
-#RAW_VERSION = 8.0.0
-#RELEASE_NAME = 8.0
-#RELEASE_MILESTONE = ea
 
 # Variables used when building on the Mac. These should need to be rarely, if ever set. The
 # default value for MACOSX_SDK_PATH is based on the MACOSX_MIN_VERSION, so if you wanted to