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

Unified Diff: build/java_prebuilt.gypi

Issue 22802005: [Android] Extend proguard preprocessing to prebuilt Java libraries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/java_prebuilt.gypi
diff --git a/build/java_prebuilt.gypi b/build/java_prebuilt.gypi
index 80003749fc7177b611919bd6f2d9365477698569..cec881dfd113727cb8d93a33f819bc99db9e5489 100644
--- a/build/java_prebuilt.gypi
+++ b/build/java_prebuilt.gypi
@@ -24,13 +24,62 @@
],
'variables': {
'dex_path': '<(PRODUCT_DIR)/lib.java/<(_target_name).dex.jar',
+ 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)',
+ 'android_jar': '<(android_sdk)/android.jar',
+ 'input_jars_paths': [ '<(android_jar)' ],
+ 'proguard_config%': '',
+ 'proguard_preprocess%': '0',
+ 'variables': {
+ 'variables': {
+ 'proguard_preprocess%': 0,
+ },
+ 'conditions': [
+ ['proguard_preprocess == 1', {
+ 'dex_input_jar_path': '<(intermediate_dir)/<(_target_name).pre.jar'
+ }, {
+ 'dex_input_jar_path': '<(jar_path)'
+ }],
+ ],
+ },
+ 'dex_input_jar_path': '<(dex_input_jar_path)',
},
'all_dependent_settings': {
'variables': {
- 'input_jars_paths': ['<(jar_path)'],
+ 'input_jars_paths': ['<(dex_input_jar_path)'],
'library_dexed_jars_paths': ['<(dex_path)'],
},
},
+ 'conditions' : [
+ ['proguard_preprocess == 1', {
+ 'actions': [
+ {
+ 'action_name': 'proguard_<(_target_name)',
+ 'message': 'Proguard preprocessing <(_target_name) jar',
+ 'inputs': [
+ '<(android_sdk_root)/tools/proguard/bin/proguard.sh',
+ '<(DEPTH)/build/android/gyp/util/build_utils.py',
+ '<(DEPTH)/build/android/gyp/proguard.py',
+ '<(jar_path)',
+ '<(proguard_config)',
+ ],
+ 'outputs': [
+ '<(dex_input_jar_path)',
+ ],
+ 'action': [
+ 'python', '<(DEPTH)/build/android/gyp/proguard.py',
+ '--proguard-path=<(android_sdk_root)/tools/proguard/bin/proguard.sh',
+ '--input-path=<(jar_path)',
+ '--output-path=<(dex_input_jar_path)',
+ '--proguard-config=<(proguard_config)',
+ '--classpath=>(input_jars_paths)',
+
+ # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
+ '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
+ ]
+ },
+ ],
+ }],
+ ],
'actions': [
{
'action_name': 'dex_<(_target_name)',
@@ -38,7 +87,7 @@
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/dex.py',
- '<(jar_path)',
+ '<(dex_input_jar_path)',
],
'outputs': [
'<(dex_path)',
@@ -51,7 +100,7 @@
# TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
'--ignore=>!(echo \'>(_inputs)\' | md5sum)',
- '<(jar_path)',
+ '<(dex_input_jar_path)',
]
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698