summaryrefslogtreecommitdiffstats
path: root/build/android
diff options
context:
space:
mode:
authoriancottrell@chromium.org <iancottrell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-23 14:33:33 +0000
committeriancottrell@chromium.org <iancottrell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-23 14:33:33 +0000
commit6bc7fd530a1354a637c300b326c3d8c530ba0d3b (patch)
tree6695531bbec3350e9df7757711ab33cca78acd4e /build/android
parentff286a22818354214a6489c747edfd6ec1a86a1a (diff)
downloadchromium_src-6bc7fd530a1354a637c300b326c3d8c530ba0d3b.zip
chromium_src-6bc7fd530a1354a637c300b326c3d8c530ba0d3b.tar.gz
chromium_src-6bc7fd530a1354a637c300b326c3d8c530ba0d3b.tar.bz2
Change javascript string replace in ant files to pure ant using a filterchain with replacestring
BUG=310065 Review URL: https://codereview.chromium.org/35023003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230421 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android')
-rw-r--r--build/android/ant/apk-codegen.xml15
-rw-r--r--build/android/ant/apk-package-resources.xml15
2 files changed, 20 insertions, 10 deletions
diff --git a/build/android/ant/apk-codegen.xml b/build/android/ant/apk-codegen.xml
index 37abb07..f9b7171 100644
--- a/build/android/ant/apk-codegen.xml
+++ b/build/android/ant/apk-codegen.xml
@@ -43,7 +43,7 @@
list the res folders in project.library.res.folder.path and the
corresponding java packages in project.library.packages, which must be
semicolon-delimited while ADDITIONAL_RES_PACKAGES is space-delimited, hence
- the javascript task.
+ the replacestring filterchain task.
-->
<path id="project.library.res.folder.path">
<filelist files="${ADDITIONAL_RES_DIRS}"/>
@@ -51,10 +51,15 @@
<path id="project.library.bin.r.file.path">
<filelist files="${ADDITIONAL_R_TEXT_FILES}"/>
</path>
- <script language="javascript">
- var before = project.getProperty("ADDITIONAL_RES_PACKAGES");
- project.setProperty("project.library.packages", before.replaceAll(" ", ";"));
- </script>
+
+ <loadresource property="project.library.packages">
+ <propertyresource name="ADDITIONAL_RES_PACKAGES"/>
+ <filterchain>
+ <replacestring from=" " to=";"/>
+ </filterchain>
+ </loadresource>
+ <!-- Set to empty if not set by the loadresource above -->
+ <property name="project.library.packages" value=""/>
<path id="project.library.manifest.file.path">
<filelist files="${LIBRARY_MANIFEST_PATHS}"/>
diff --git a/build/android/ant/apk-package-resources.xml b/build/android/ant/apk-package-resources.xml
index 3bfd3c9..b716c16 100644
--- a/build/android/ant/apk-package-resources.xml
+++ b/build/android/ant/apk-package-resources.xml
@@ -71,7 +71,7 @@
list the res folders in project.library.res.folder.path and the
corresponding java packages in project.library.packages, which must be
semicolon-delimited while ADDITIONAL_RES_PACKAGES is space-delimited, hence
- the javascript task.
+ the replacestring filterchain task.
-->
<path id="project.library.res.folder.path">
<filelist files="${ADDITIONAL_RES_DIRS}"/>
@@ -79,10 +79,15 @@
<path id="project.library.bin.r.file.path">
<filelist files="${ADDITIONAL_R_TEXT_FILES}"/>
</path>
- <script language="javascript">
- var before = project.getProperty("ADDITIONAL_RES_PACKAGES");
- project.setProperty("project.library.packages", before.replaceAll(" ", ";"));
- </script>
+
+ <loadresource property="project.library.packages">
+ <propertyresource name="ADDITIONAL_RES_PACKAGES"/>
+ <filterchain>
+ <replacestring from=" " to=";"/>
+ </filterchain>
+ </loadresource>
+ <!-- Set to empty if not set by the loadresource above -->
+ <property name="project.library.packages" value=""/>
<property name="build.packaging.nocrunch" value="true" />