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

Unified Diff: build/java_apk.gypi

Issue 321883002: Make test apks only dex files not in tested apk (proguard version) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « build/java_aidl.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/java_apk.gypi
diff --git a/build/java_apk.gypi b/build/java_apk.gypi
index 348ce815855af14a7ad1dc54f3e8ecc962a3ebaf..92c8cfa0b5e29bb8a70644562bc4182a721e1c59 100644
--- a/build/java_apk.gypi
+++ b/build/java_apk.gypi
@@ -52,6 +52,7 @@
# never_lint - Set to 1 to not run lint on this target.
{
'variables': {
+ 'tested_apk_obfuscated_jar_path%': '/',
'tested_apk_dex_path%': '/',
'additional_input_paths': [],
'input_jars_paths': [],
@@ -158,8 +159,16 @@
# direct_dependent_settings, but a variable set by a direct_dependent_settings
# cannot be lifted in a dependent to all_dependent_settings.
'all_dependent_settings': {
+ 'conditions': [
+ ['proguard_enabled == "true"', {
+ 'variables': {
+ 'proguard_enabled': 'true',
+ }
+ }],
+ ],
'variables': {
'apk_output_jar_path': '<(jar_path)',
+ 'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)',
'tested_apk_dex_path': '<(dex_path)',
},
},
@@ -604,23 +613,36 @@
'message': 'Obfuscating <(_target_name)',
'variables': {
'additional_obfuscate_options': [],
+ 'additional_obfuscate_input_paths': [],
'proguard_out_dir': '<(intermediate_dir)/proguard',
'proguard_input_jar_paths': [
'>@(input_jars_paths)',
'<(jar_path)',
],
- 'conditions': [
+ 'target_conditions': [
['is_test_apk == 1', {
'additional_obfuscate_options': [
'--testapp',
],
}],
+ ['is_test_apk == 1 and tested_apk_obfuscated_jar_path != "/"', {
+ 'additional_obfuscate_options': [
+ '--tested-apk-obfuscated-jar-path', '>(tested_apk_obfuscated_jar_path)',
+ ],
+ 'additional_obfuscate_input_paths': [
+ '>(tested_apk_obfuscated_jar_path).info',
+ ],
+ }],
['proguard_enabled == "true"', {
'additional_obfuscate_options': [
'--proguard-enabled',
],
}],
],
+ 'obfuscate_input_jars_paths': [
+ '>@(input_jars_paths)',
+ '<(jar_path)',
+ ],
},
'conditions': [
['is_test_apk == 1', {
@@ -633,15 +655,16 @@
'<(DEPTH)/build/android/gyp/apk_obfuscate.py',
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'>@(proguard_flags_paths)',
- '>@(proguard_input_jar_paths)',
+ '>@(obfuscate_input_jars_paths)',
+ '>@(additional_obfuscate_input_paths)',
+ '<(instr_stamp)',
],
'outputs': [
- # This lists obfuscate_stamp instead of obfuscated_jar_path because
- # ant only writes the latter if the md5 of the inputs changes.
'<(obfuscate_stamp)',
# In non-Release builds, these paths will all be empty files.
'<(obfuscated_jar_path)',
+ '<(obfuscated_jar_path).info',
'<(obfuscated_jar_path).dump',
'<(obfuscated_jar_path).seeds',
'<(obfuscated_jar_path).mapping',
@@ -657,15 +680,17 @@
'--android-sdk-jar', '<(android_sdk_jar)',
'--input-jars-paths=>(proguard_input_jar_paths)',
+ '--proguard-configs=>(proguard_flags_paths)',
+
+
'--test-jar-path', '<(test_jar_path)',
'--obfuscated-jar-path', '<(obfuscated_jar_path)',
'--proguard-jar-path', '<(android_sdk_root)/tools/proguard/lib/proguard.jar',
- '--proguard-config-files=<(proguard_flags_paths)',
'--stamp', '<(obfuscate_stamp)',
- '<@(additional_obfuscate_options)',
+ '>@(additional_obfuscate_options)',
],
},
{
@@ -695,8 +720,6 @@
'>(tested_apk_dex_path).inputs',
],
}],
- ],
- 'conditions': [
['proguard_enabled == "true"', {
'inputs': [ '<(obfuscate_stamp)' ]
}, {
« no previous file with comments | « build/java_aidl.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698