summaryrefslogtreecommitdiffstats
path: root/build/java.gypi
diff options
context:
space:
mode:
authorkkimlabs@chromium.org <kkimlabs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-04 15:47:16 +0000
committerkkimlabs@chromium.org <kkimlabs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-04 15:47:16 +0000
commit19635dcf8b5675293afffbecfea4b01d171afb99 (patch)
tree79efd1d8da5b4d02782962974475d9d47b8413f6 /build/java.gypi
parent94cd609b33ea2eb24e9f26bfdb12a20d25327d8a (diff)
downloadchromium_src-19635dcf8b5675293afffbecfea4b01d171afb99.zip
chromium_src-19635dcf8b5675293afffbecfea4b01d171afb99.tar.gz
chromium_src-19635dcf8b5675293afffbecfea4b01d171afb99.tar.bz2
[Android] Auto-generate RTL layout xmls from existing layout xmls.
There are several attributes introduced in API 17, mostly for BiDi(RTL) support, e.g., paddingStart. This build script will generate another set of resource that is API 14 compatible by converting those API 17 attributes to API 14 attributes, e.g., paddingStart -> paddingLeft. The goal of this script is for programmers to use those attributes without worrying about backward-compatibility care and related bugs. About the bugs, please refer to crbug.com/235118 . BUG=235118 Review URL: https://chromiumcodereview.appspot.com/14476011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/java.gypi')
-rw-r--r--build/java.gypi61
1 files changed, 57 insertions, 4 deletions
diff --git a/build/java.gypi b/build/java.gypi
index fdcbe57..453c671 100644
--- a/build/java.gypi
+++ b/build/java.gypi
@@ -83,14 +83,21 @@
'variables': {
'res_dir': '<(java_in_dir)/res',
'res_crunched_dir': '<(intermediate_dir)/res_crunched',
+ 'res_v14_dir': '<(intermediate_dir)/res_v14',
+ 'res_v14_stamp': '<(intermediate_dir)/res_v14.stamp',
+ 'res_v17_dir': '<(intermediate_dir)/res_v17',
+ 'res_v17_stamp': '<(intermediate_dir)/res_v17.stamp',
'res_input_dirs': ['<(res_dir)', '<@(res_extra_dirs)'],
'resource_input_paths': ['<!@(find <(res_dir) -type f)'],
'R_dir': '<(intermediate_dir)/java_R',
'R_text_file': '<(R_dir)/R.txt',
'R_stamp': '<(intermediate_dir)/resources.stamp',
'generated_src_dirs': ['<(R_dir)'],
- 'additional_input_paths': ['<(R_stamp)'],
+ 'additional_input_paths': ['<(R_stamp)',
+ '<(res_v14_stamp)',
+ '<(res_v17_stamp)',],
'additional_res_dirs': [],
+ 'dependencies_res_input_dirs': [],
'dependencies_res_files': [],
},
'all_dependent_settings': {
@@ -99,13 +106,20 @@
# generated_R_dirs and include its resources via
# dependencies_res_files.
'generated_R_dirs': ['<(R_dir)'],
- 'additional_input_paths': ['<(R_stamp)'],
+ 'additional_input_paths': ['<(R_stamp)',
+ '<(res_v14_stamp)',
+ '<(res_v17_stamp)',],
'dependencies_res_files': ['<@(resource_input_paths)'],
+ 'dependencies_res_input_dirs': ['<@(res_input_dirs)'],
+
# Dependent APKs include this target's resources via
# additional_res_dirs, additional_res_packages, and
# additional_R_text_files.
- 'additional_res_dirs': ['<(res_crunched_dir)', '<@(res_input_dirs)'],
+ 'additional_res_dirs': ['<(res_crunched_dir)',
+ '<(res_v14_dir)',
+ '<(res_v17_dir)',
+ '<@(res_input_dirs)'],
'additional_res_packages': ['<(R_package)'],
'additional_R_text_files': ['<(R_text_file)'],
},
@@ -141,7 +155,8 @@
'android_manifest': '<(DEPTH)/build/android/AndroidManifest.xml',
# Include the dependencies' res dirs so that references to
# resources in dependencies can be resolved.
- 'all_res_dirs': ['<@(res_input_dirs)', '>@(additional_res_dirs)'],
+ 'all_res_dirs': ['<@(res_input_dirs)',
+ '>@(dependencies_res_input_dirs)',],
},
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
@@ -171,6 +186,44 @@
'--ignore=>!(echo \'>(_inputs)\' | md5sum)',
],
},
+ # Copy API 17 resources.
+ {
+ 'action_name': 'copy_v17_resources_<(_target_name)',
+ 'message': 'Copying Android API 17 resources <(_target_name)',
+ 'inputs': [
+ '<(DEPTH)/build/android/gyp/util/build_utils.py',
+ '<(DEPTH)/build/android/gyp/copy_v17_resources.py',
+ '>@(resource_input_paths)',
+ ],
+ 'outputs': [
+ '<(res_v17_stamp)',
+ ],
+ 'action': [
+ 'python', '<(DEPTH)/build/android/gyp/copy_v17_resources.py',
+ '--res-dir=<(res_dir)',
+ '--res-v17-dir=<(res_v17_dir)',
+ '--stamp', '<(res_v17_stamp)',
+ ]
+ },
+ # Generate API 14 resources.
+ {
+ 'action_name': 'generate_api_14_resources_<(_target_name)',
+ 'message': 'Generating Android API 14 resources <(_target_name)',
+ 'inputs': [
+ '<(DEPTH)/build/android/gyp/util/build_utils.py',
+ '<(DEPTH)/build/android/gyp/generate_v14_resources.py',
+ '>@(resource_input_paths)',
+ ],
+ 'outputs': [
+ '<(res_v14_stamp)',
+ ],
+ 'action': [
+ 'python', '<(DEPTH)/build/android/gyp/generate_v14_resources.py',
+ '--res-dir=<(res_dir)',
+ '--res-v14-dir=<(res_v14_dir)',
+ '--stamp', '<(res_v14_stamp)',
+ ]
+ },
],
}],
],