changeset 4249:4a0f90adb523

iOS build: added an option to exclude libs from exported.symbols file
author David Pulkrabek <david.pulkrabek@oracle.com>
date Wed, 10 Jul 2013 11:18:27 +0200
parents 74160b530dfa
children b5d3f276d44b
files build.gradle buildSrc/ios.gradle buildSrc/src/main/groovy/com/sun/javafx/gradle/ExportedSymbolsTask.groovy
diffstat 3 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Wed Jul 10 11:01:52 2013 +0400
+++ b/build.gradle	Wed Jul 10 11:18:27 2013 +0200
@@ -1841,6 +1841,7 @@
             def libDirName = "build/${t.name}-sdk/rt/$targetProperties.libDest"
             libDir = file("$libDirName")
             outputFile = file("$libDirName/exported.symbols")
+            excludes = targetProperties.generateSymbolsExcludes
         }
         sdk.dependsOn(exportedSymbolsTask)
     }
--- a/buildSrc/ios.gradle	Wed Jul 10 11:01:52 2013 +0400
+++ b/buildSrc/ios.gradle	Wed Jul 10 11:18:27 2013 +0200
@@ -41,6 +41,11 @@
 if (USE_LIPO instanceof String) IOS.useLipo = Boolean.parseBoolean(USE_LIPO)
 if (GENERATE_SYMBOLS instanceof String) IOS.generateSymbols = Boolean.parseBoolean(GENERATE_SYMBOLS)
 
+IOS.generateSymbolsExcludes = [
+    "libprism-sw.a",
+    "libdecora-sse-armv7.a"
+]
+
 defineProperty("IOS_VERSION", "6.1")
 
 // Lambda for naming the generated libs
--- a/buildSrc/src/main/groovy/com/sun/javafx/gradle/ExportedSymbolsTask.groovy	Wed Jul 10 11:01:52 2013 +0400
+++ b/buildSrc/src/main/groovy/com/sun/javafx/gradle/ExportedSymbolsTask.groovy	Wed Jul 10 11:18:27 2013 +0200
@@ -25,12 +25,14 @@
 
 import org.gradle.api.DefaultTask
 import org.gradle.api.tasks.InputDirectory
+import org.gradle.api.tasks.Optional
 import org.gradle.api.tasks.OutputFile
 import org.gradle.api.tasks.TaskAction
 
 class ExportedSymbolsTask extends DefaultTask {
     @OutputFile File outputFile;
     @InputDirectory File libDir;
+    @Optional List<String> excludes;
 
 
     @TaskAction void generateExportedSymbols() {
@@ -38,8 +40,8 @@
         List<String> libNames = [];
         List<File> files = libDir.listFiles();
         files.each { file ->
-            if (!file.isDirectory() && file.getName().endsWith(".a")) {
-                libNames.add(file.getAbsolutePath())
+            if (!file.isDirectory() && file.getName().endsWith(".a") && !excludes.contains(file.getName())) {
+                libNames.add(file.getAbsolutePath());
             }
         }