changeset 3547:dcd9d995182e

Gradle Build: - Added support for building fontT2K - Fixed condition that can occur during build if previous build left dependency cache in a bad state (NativeCompileTask.groovy)
author rbair
date Tue, 07 May 2013 23:07:35 +0100
parents c828a8d30727
children 25775de62ac6
files gradleBuildSrc/armv6hf.gradle gradleBuildSrc/armv6sf.gradle gradleBuildSrc/linux.gradle gradleBuildSrc/mac.gradle gradleBuildSrc/src/main/groovy/com/sun/javafx/build/NativeCompileTask.groovy gradleBuildSrc/win.gradle
diffstat 6 files changed, 66 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gradleBuildSrc/armv6hf.gradle	Tue May 07 21:31:34 2013 +0100
+++ b/gradleBuildSrc/armv6hf.gradle	Tue May 07 23:07:35 2013 +0100
@@ -307,3 +307,15 @@
 ARMV6HF.font.linker = linker
 ARMV6HF.font.linkFlags = fontLFlags
 ARMV6HF.font.lib = "javafx-font"
+
+ARMV6HF.fontT2K = [:]
+ARMV6HF.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
+ARMV6HF.fontT2K.nativeSource = [
+        file("$closedDir/javafx-font-t2k-native/src"),
+        file("$closedDir/javafx-font-t2k-native/src/layout"),
+        file("$closedDir/javafx-font-t2k-native/src/layoutfx")]
+ARMV6HF.fontT2K.compiler = compiler
+ARMV6HF.fontT2K.ccFlags = fontCFlags
+ARMV6HF.fontT2K.linker = linker
+ARMV6HF.fontT2K.linkFlags = fontLFlags
+ARMV6HF.fontT2K.lib = "javafx-font-t2k"
--- a/gradleBuildSrc/armv6sf.gradle	Tue May 07 21:31:34 2013 +0100
+++ b/gradleBuildSrc/armv6sf.gradle	Tue May 07 23:07:35 2013 +0100
@@ -331,3 +331,15 @@
 ARMV6SF.font.linker = LINKER
 ARMV6SF.font.linkFlags = fontLFlags
 ARMV6SF.font.lib = "javafx-font"
+
+ARMV6SF.fontT2K = [:]
+ARMV6SF.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
+ARMV6SF.fontT2K.nativeSource = [
+        file("$closedDir/javafx-font-t2k-native/src"),
+        file("$closedDir/javafx-font-t2k-native/src/layout"),
+        file("$closedDir/javafx-font-t2k-native/src/layoutfx")]
+ARMV6SF.fontT2K.compiler = COMPILER
+ARMV6SF.fontT2K.ccFlags = fontCFlags
+ARMV6SF.fontT2K.linker = LINKER
+ARMV6SF.fontT2K.linkFlags = fontLFlags
+ARMV6SF.fontT2K.lib = "javafx-font-t2k"
--- a/gradleBuildSrc/linux.gradle	Tue May 07 21:31:34 2013 +0100
+++ b/gradleBuildSrc/linux.gradle	Tue May 07 23:07:35 2013 +0100
@@ -186,3 +186,15 @@
 LINUX.font.linker = linker
 LINUX.font.linkFlags = [linkFlags].flatten()
 LINUX.font.lib = "javafx-font"
+
+LINUX.fontT2K = [:]
+LINUX.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
+LINUX.fontT2K.nativeSource = [
+        file("$closedDir/javafx-font-t2k-native/src"),
+        file("$closedDir/javafx-font-t2k-native/src/layout"),
+        file("$closedDir/javafx-font-t2k-native/src/layoutfx")]
+LINUX.fontT2K.compiler = compiler
+LINUX.fontT2K.ccFlags = ["-DJFXFONT_PLUS", ccFlags].flatten()
+LINUX.fontT2K.linker = linker
+LINUX.fontT2K.linkFlags = [linkFlags].flatten()
+LINUX.fontT2K.lib = "javafx-font-t2k"
--- a/gradleBuildSrc/mac.gradle	Tue May 07 21:31:34 2013 +0100
+++ b/gradleBuildSrc/mac.gradle	Tue May 07 23:07:35 2013 +0100
@@ -185,3 +185,15 @@
 MAC.font.linker = linker
 MAC.font.linkFlags = [linkFlags].flatten()
 MAC.font.lib = "javafx-font"
+
+MAC.fontT2K = [:]
+MAC.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
+MAC.fontT2K.nativeSource = [
+        file("$closedDir/javafx-font-t2k-native/src"),
+        file("$closedDir/javafx-font-t2k-native/src/layout"),
+        file("$closedDir/javafx-font-t2k-native/src/layoutfx")]
+MAC.fontT2K.compiler = compiler
+MAC.fontT2K.ccFlags = ["-DJFXFONT_PLUS", ccFlags].flatten()
+MAC.fontT2K.linker = linker
+MAC.fontT2K.linkFlags = [linkFlags].flatten()
+MAC.fontT2K.lib = "javafx-font-t2k"
--- a/gradleBuildSrc/src/main/groovy/com/sun/javafx/build/NativeCompileTask.groovy	Tue May 07 21:31:34 2013 +0100
+++ b/gradleBuildSrc/src/main/groovy/com/sun/javafx/build/NativeCompileTask.groovy	Tue May 07 23:07:35 2013 +0100
@@ -77,7 +77,12 @@
         final File nativeDependenciesFile = project.file("$project.buildDir/dependency-cache/native-dependencies");
         if (nativeDependenciesFile.exists()) {
             nativeDependenciesFile.splitEachLine("\t", { strings ->
-                dependencies.put(strings[0], ["DATE":Long.parseLong(strings[1]), "SIZE":Long.parseLong(strings[2])]);
+                try {
+                    dependencies.put(strings[0], ["DATE":Long.parseLong(strings[1]), "SIZE":Long.parseLong(strings[2])]);
+                } catch (Exception e) {
+                    // Might fail due to a corrupt native-dependencies file, in which case, we'll just not
+                    // do anything which will cause the native code to execute again
+                }
             });
         }
 
--- a/gradleBuildSrc/win.gradle	Tue May 07 21:31:34 2013 +0100
+++ b/gradleBuildSrc/win.gradle	Tue May 07 23:07:35 2013 +0100
@@ -249,3 +249,15 @@
 WIN.font.linker = linker
 WIN.font.linkFlags = [linkFlags, "advapi32.lib", "gdi32.lib", "user32.lib"].flatten()
 WIN.font.lib = "javafx-font"
+
+WIN.fontT2K = [:]
+WIN.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
+WIN.fontT2K.nativeSource = [
+        file("$closedDir/javafx-font-t2k-native/src"),
+        file("$closedDir/javafx-font-t2k-native/src/layout"),
+        file("$closedDir/javafx-font-t2k-native/src/layoutfx")]
+WIN.fontT2K.compiler = compiler
+WIN.fontT2K.ccFlags = ["/DJFXFONT_PLUS", ccFlags].flatten()
+WIN.fontT2K.linker = linker
+WIN.fontT2K.linkFlags = [linkFlags, "advapi32.lib", "gdi32.lib", "user32.lib"].flatten()
+WIN.fontT2K.lib = "javafx-font-t2k"