From 19635dcf8b5675293afffbecfea4b01d171afb99 Mon Sep 17 00:00:00 2001 From: "kkimlabs@chromium.org" Date: Sat, 4 May 2013 15:47:16 +0000 Subject: [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 --- build/java.gypi | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 4 deletions(-) (limited to 'build/java.gypi') 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': ['@(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)', + ] + }, ], }], ], -- cgit v1.1