diff options
author | cjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-18 02:33:37 +0000 |
---|---|---|
committer | cjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-18 02:33:37 +0000 |
commit | 6593b277eafa971ae5e05a5200e6757e71684628 (patch) | |
tree | 393077d1827d94333c9b14e3563a3bd54e44f664 /build/java_apk.gypi | |
parent | 977b69904d8625342ca73b3f1636ba716a565c7b (diff) | |
download | chromium_src-6593b277eafa971ae5e05a5200e6757e71684628.zip chromium_src-6593b277eafa971ae5e05a5200e6757e71684628.tar.gz chromium_src-6593b277eafa971ae5e05a5200e6757e71684628.tar.bz2 |
[Android] Fix proguard
Gyp supports only very limited ways of changing behavior based upon
CONFIGURATION_NAME. Particularly, it does not support the way that was
supposed to enable/disable use of proguard.
Instead of trying to switch behavior in gyp, instead pass
CONFIGURATION_NAME, proguard_enabled, and
proguard_enabled_dex_input_path to dex.py and switch the behavior
there.
This also extracts the dex actions into build/android/dex_action.gypi
and uses that for the actions in both build/java.gypi and
build/java_apk.gypi.
BUG=240837
Review URL: https://chromiumcodereview.appspot.com/15231006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200958 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/java_apk.gypi')
-rw-r--r-- | build/java_apk.gypi | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/build/java_apk.gypi b/build/java_apk.gypi index 19f85bc..8c794f0 100644 --- a/build/java_apk.gypi +++ b/build/java_apk.gypi @@ -480,43 +480,19 @@ }, { 'action_name': 'dex_<(_target_name)', - 'message': 'Dexing <(_target_name) jar', 'variables': { 'conditions': [ - ['proguard_enabled=="true" and CONFIGURATION_NAME=="Release"', { - 'dex_inputs': [ '<(obfuscated_jar_path)' ], - 'dex_generated_inputs': [], - }, { - 'dex_inputs': [ - '>@(library_dexed_jars_paths)', - ], - 'dex_generated_inputs': [ - '<(classes_dir)', - ], + ['proguard_enabled == "true"', { + 'input_paths': [ '<(obfuscate_stamp)' ], + 'proguard_enabled_input_path': '<(obfuscated_jar_path)', }], ], + 'input_paths': [ '<(compile_stamp)' ], + 'dex_input_paths': [ '>@(library_dexed_jars_paths)' ], + 'dex_generated_input_dirs': [ '<(classes_dir)' ], + 'output_path': '<(dex_path)', }, - 'inputs': [ - '<(DEPTH)/build/android/gyp/util/build_utils.py', - '<(DEPTH)/build/android/gyp/util/md5_check.py', - '<(DEPTH)/build/android/gyp/dex.py', - '<(compile_stamp)', - '>@(dex_inputs)', - ], - 'outputs': [ - '<(dex_path)', - ], - 'action': [ - 'python', '<(DEPTH)/build/android/gyp/dex.py', - '--dex-path=<(dex_path)', - '--android-sdk-root=<(android_sdk_root)', - - # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja. - '--ignore=>!(echo \'>(_inputs)\' | md5sum)', - - '>@(dex_inputs)', - '>@(dex_generated_inputs)', - ] + 'includes': [ 'android/dex_action.gypi' ], }, { 'action_name': 'ant package resources', |