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

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

Issue 2295363002: 🔔 Allow android_* targets to specify proguard flags for apks (Closed)
Patch Set: Created 4 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 | build/android/gyp/write_build_config.py » ('j') | build/android/gyp/write_build_config.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/proguard.py
diff --git a/build/android/gyp/proguard.py b/build/android/gyp/proguard.py
index 8a4ac599a4789c5280b03376907e594467a4af52..672ce54c4501382bdba6d62d70aa3d77038b62dd 100755
--- a/build/android/gyp/proguard.py
+++ b/build/android/gyp/proguard.py
@@ -29,7 +29,7 @@ def _ParseOptions(args):
parser.add_option('--input-paths',
help='Paths to the .jar files proguard should run on.')
parser.add_option('--output-path', help='Path to the generated .jar file.')
- parser.add_option('--proguard-configs',
+ parser.add_option('--proguard-configs', action='append',
help='Paths to proguard configuration files.')
parser.add_option('--mapping', help='Path to proguard mapping to apply.')
parser.add_option('--is-test', action='store_true',
@@ -52,6 +52,13 @@ def _ParseOptions(args):
classpath += build_utils.ParseGnList(arg)
options.classpath = classpath
+ configs = []
+ for arg in options.proguard_configs:
+ configs += build_utils.ParseGnList(arg)
+ options.proguard_configs = configs
+
+ options.input_paths = build_utils.ParseGnList(options.input_paths)
+
return options
@@ -60,9 +67,10 @@ def main(args):
options = _ParseOptions(args)
proguard = proguard_util.ProguardCmdBuilder(options.proguard_path)
- proguard.injars(build_utils.ParseGnList(options.input_paths))
- proguard.configs(build_utils.ParseGnList(options.proguard_configs))
+ proguard.injars(options.input_paths)
+ proguard.configs(options.proguard_configs)
proguard.outjar(options.output_path)
+ print options.proguard_configs
if options.mapping:
proguard.mapping(options.mapping)
« no previous file with comments | « no previous file | build/android/gyp/write_build_config.py » ('j') | build/android/gyp/write_build_config.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698