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

Unified Diff: build/java_apk.gypi

Issue 322443005: Convert apk obfuscation to python (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
« build/android/gyp/apk_obfuscate.py ('K') | « build/apk_fake_jar.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 b654ad88bddba7488a88183d4107a78cd6c15979..aab83793050e5e539848be9cf1a083a9cce84ede 100644
--- a/build/java_apk.gypi
+++ b/build/java_apk.gypi
@@ -585,6 +585,7 @@
],
'outputs': [
'<(jar_stamp)',
+ '<(jar_path)',
],
'action': [
'python', '<(DEPTH)/build/android/gyp/jar.py',
@@ -597,11 +598,29 @@
{
'action_name': 'ant_obfuscate_<(_target_name)',
'message': 'Obfuscating <(_target_name)',
+ 'variables': {
+ 'additional_obfuscate_options': [],
+ 'proguard_out_dir': '<(intermediate_dir)/proguard',
+ 'proguard_input_jar_paths': [
+ '>@(input_jars_paths)',
+ '<(jar_path)',
+ ],
+ 'conditions': [
+ ['is_test_apk == 1', {
+ 'additional_obfuscate_options': [
+ '--testapp',
+ ],
+ }],
+ ['proguard_enabled == "true"', {
+ 'additional_obfuscate_options': [
+ '--proguard-enabled',
+ ],
+ }],
+ ],
+ },
'inputs': [
- '<(DEPTH)/build/android/ant/apk-obfuscate.xml',
+ '<(DEPTH)/build/android/gyp/apk_obfuscate.py',
'<(DEPTH)/build/android/gyp/util/build_utils.py',
- '<(DEPTH)/build/android/gyp/ant.py',
- '<(android_manifest_path)',
'>@(proguard_flags_paths)',
'<(instr_stamp)',
],
@@ -609,29 +628,36 @@
# 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).dump',
+ '<(obfuscated_jar_path).seeds',
+ '<(obfuscated_jar_path).mapping',
+ '<(obfuscated_jar_path).usage',
+
+ # test_jar_path
Yaron 2014/06/07 07:02:38 ?
cjhopman 2014/06/10 17:10:16 Done.
],
'action': [
- 'python', '<(DEPTH)/build/android/gyp/ant.py',
- '-quiet',
- '-DANDROID_MANIFEST=<(android_manifest_path)',
- '-DANDROID_SDK_JAR=<(android_sdk_jar)',
- '-DANDROID_SDK_ROOT=<(android_sdk_root)',
- '-DANDROID_SDK_VERSION=<(android_sdk_version)',
- '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
- '-DAPK_NAME=<(apk_name)',
- '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)',
- '-DINPUT_JARS_PATHS=>(input_jars_paths)',
- '-DIS_TEST_APK=<(is_test_apk)',
- '-DOBFUSCATED_JAR_PATH=<(obfuscated_jar_path)',
- '-DOUT_DIR=<(intermediate_dir)',
- '-DPROGUARD_ENABLED=<(proguard_enabled)',
- '-DPROGUARD_FLAGS=<(proguard_flags_paths)',
- '-DTEST_JAR_PATH=<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar',
+ 'python', '<(DEPTH)/build/android/gyp/apk_obfuscate.py',
- '-DSTAMP=<(obfuscate_stamp)',
- '-Dbasedir=.',
- '-buildfile',
- '<(DEPTH)/build/android/ant/apk-obfuscate.xml',
+ '--configuration-name', '<(CONFIGURATION_NAME)',
+
+ '--android-sdk', '<(android_sdk)',
+ '--android-sdk-tools', '<(android_sdk_tools)',
+ '--android-sdk-jar', '<(android_sdk_jar)',
+
+ '--input-jars-paths=>(proguard_input_jar_paths)',
+
+ '--test-jar-path', '<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar',
+ '--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)',
],
},
{
« build/android/gyp/apk_obfuscate.py ('K') | « build/apk_fake_jar.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698