diff options
author | newt@chromium.org <newt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-07 18:02:29 +0000 |
---|---|---|
committer | newt@chromium.org <newt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-07 18:02:29 +0000 |
commit | 223453462ebdbc9252fa0f0fc247d13c4f1188c2 (patch) | |
tree | 3c56977affd1ef19ffe345d990ca72c49e7571dd /build/java.gypi | |
parent | 31b20b52a8185b52be91108de8dea23f40d721b3 (diff) | |
download | chromium_src-223453462ebdbc9252fa0f0fc247d13c4f1188c2.zip chromium_src-223453462ebdbc9252fa0f0fc247d13c4f1188c2.tar.gz chromium_src-223453462ebdbc9252fa0f0fc247d13c4f1188c2.tar.bz2 |
Mirror images for RTL languages at build time.
This adds a build step to generate mirrored images for use in
right-to-left (RTL) languages. Images are mirrored by flipping the
original image over the vertical axis. Every image must be explicitly
listed as mirrorable or non-mirrorable in a config file.
The goal: ensure that our RTL image assets are always up-to-date.
BUG=290225
NOTRY=true
Review URL: https://codereview.chromium.org/106173002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243332 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/java.gypi')
-rw-r--r-- | build/java.gypi | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/build/java.gypi b/build/java.gypi index b3daebb..a87cace 100644 --- a/build/java.gypi +++ b/build/java.gypi @@ -71,6 +71,8 @@ 'res_extra_files': [], 'res_v14_verify_only%': 0, 'resource_input_paths': ['>@(res_extra_files)'], + 'mirror_images%': 0, + 'mirror_images_args': [], 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', 'classes_dir': '<(intermediate_dir)/classes', 'compile_stamp': '<(intermediate_dir)/compile.stamp', @@ -171,9 +173,24 @@ }, ], }], + ['mirror_images == 1', { + 'variables': { + 'res_mirrored_dir': '<(intermediate_dir)/res_mirrored', + 'mirror_images_config': '<(java_in_dir)/mirror_images_config', + 'mirror_images_args': ['--mirror-config', '<(mirror_images_config)', + '--mirror-output-dir', '<(res_mirrored_dir)'], + 'resource_input_paths': ['<(mirror_images_config)', + '<(DEPTH)/build/android/gyp/mirror_images.py'], + }, + 'all_dependent_settings': { + 'variables': { + 'additional_res_dirs': ['<(res_mirrored_dir)'], + }, + }, + }], ], 'actions': [ - # Generate R.java and crunch image resources. + # Generate R.java; mirror and crunch image resources. { 'action_name': 'process_resources', 'message': 'processing resources for <(_target_name)', @@ -203,12 +220,13 @@ '--android-sdk-tools', '<(android_sdk_tools)', '--R-dir', '<(R_dir)', '--res-dirs', '>(all_res_dirs)', - '--crunch-input-dir', '>(res_dir)', + '--image-input-dir', '>(res_dir)', '--crunch-output-dir', '<(res_crunched_dir)', '--android-manifest', '<(android_manifest)', '--non-constant-id', '--custom-package', '<(R_package)', '--stamp', '<(R_stamp)', + '<@(mirror_images_args)', # Add hash of inputs to the command line, so if inputs change # (e.g. if a resource if removed), the command will be re-run. |