Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: build/java.gypi

Issue 11516024: [Android] Add process_resources.py to build Android library resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use res_dir not java_in_dir/res Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/process_resources.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/java.gypi
diff --git a/build/java.gypi b/build/java.gypi
index 215b562ba5f8d1e94866a49f24708f4ebbc8f64b..0a1df8a873eeef036b49251e1da20469b803e278 100644
--- a/build/java.gypi
+++ b/build/java.gypi
@@ -69,6 +69,8 @@
'conditions': [
['has_java_resources == 1', {
'variables': {
+ 'res_dir': '<(java_in_dir)/res',
+ 'crunched_res_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)/res',
'R_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)/java_R',
'R_file': '<(R_dir)/<(R_package_relpath)/R.java',
'generated_src_dirs': ['<(R_dir)'],
@@ -83,38 +85,30 @@
# Dependent APKs include this target's resources via
# additional_res_dirs and additional_res_packages.
- 'additional_res_dirs': ['<(java_in_dir)/res'],
+ 'additional_res_dirs': ['<(crunched_res_dir)', '<(res_dir)'],
'additional_res_packages': ['<(R_package)'],
},
},
'actions': [
- # Generate R.java for the library. This R.java contains non-final
- # constants and is used only while compiling the library jar (e.g.
- # chromium_content.jar). When building an apk, a new R.java file with
- # the correct resource -> ID mappings will be generated by merging the
- # resources from all libraries and the main apk project.
+ # Generate R.java and crunch image resources.
{
- 'action_name': 'generate_r_java',
- 'message': 'generating R.java for <(package_name)',
+ 'action_name': 'process_resources',
+ 'message': 'processing resources for <(package_name)',
'inputs': [
- '<(android_sdk_tools)/aapt',
- '<(android_sdk)/android.jar',
- '<(DEPTH)/build/android/AndroidManifest.xml',
- '<!@(find <(java_in_dir)/res -type f)',
+ '<(DEPTH)/build/android/process_resources.py',
+ '<!@(find <(res_dir) -type f)',
],
'outputs': [
'<(R_file)',
],
'action': [
- '<(android_sdk_tools)/aapt',
- 'package',
- '-m',
- '--non-constant-id',
- '--custom-package', '<(R_package)',
- '-M', '<(DEPTH)/build/android/AndroidManifest.xml',
- '-S', '<(java_in_dir)/res',
- '-I', '<(android_sdk)/android.jar',
- '-J', '<(R_dir)',
+ '<(DEPTH)/build/android/process_resources.py',
+ '--android-sdk', '<(android_sdk)',
+ '--android-sdk-tools', '<(android_sdk_tools)',
+ '--R-package', '<(R_package)',
+ '--R-dir', '<(R_dir)',
+ '--res-dir', '<(res_dir)',
+ '--crunched-res-dir', '<(crunched_res_dir)',
],
},
],
« no previous file with comments | « build/android/process_resources.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698