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

Unified Diff: build/android/gyp/apk_obfuscate.py

Issue 1436083002: Revert of GN: Enable proguard for apks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | build/android/gyp/proguard.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/apk_obfuscate.py
diff --git a/build/android/gyp/apk_obfuscate.py b/build/android/gyp/apk_obfuscate.py
index a227945691c14bda1080c6f97d57bc28440dce43..286555dcd8671780292aeadd2f39cea9e605cae7 100755
--- a/build/android/gyp/apk_obfuscate.py
+++ b/build/android/gyp/apk_obfuscate.py
@@ -85,6 +85,7 @@
proguard = proguard_util.ProguardCmdBuilder(options.proguard_jar_path)
proguard.outjar(options.obfuscated_jar_path)
+ library_classpath = [options.android_sdk_jar]
input_jars = build_utils.ParseGypList(options.input_jars_paths)
exclude_paths = []
@@ -93,14 +94,29 @@
# configs should only contain the process_resources.py generated config.
assert len(configs) == 1, (
'test apks should not have custom proguard configs: ' + str(configs))
- proguard.tested_apk_info(options.tested_apk_obfuscated_jar_path + '.info')
+ tested_jar_info = build_utils.ReadJson(
+ options.tested_apk_obfuscated_jar_path + '.info')
+ exclude_paths = tested_jar_info['inputs']
+ configs = tested_jar_info['configs']
- proguard.libraryjars([options.android_sdk_jar])
+ proguard.is_test(True)
+ proguard.mapping(options.tested_apk_obfuscated_jar_path + '.mapping')
+ library_classpath.append(options.tested_apk_obfuscated_jar_path)
+
+ proguard.libraryjars(library_classpath)
proguard_injars = [p for p in input_jars if p not in exclude_paths]
proguard.injars(proguard_injars)
proguard.configs(configs)
proguard.CheckOutput()
+
+ this_info = {
+ 'inputs': proguard_injars,
+ 'configs': configs
+ }
+
+ build_utils.WriteJson(
+ this_info, options.obfuscated_jar_path + '.info')
def main(argv):
« no previous file with comments | « no previous file | build/android/gyp/proguard.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698