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

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

Issue 484813002: Add support for prebuilt jars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-lint
Patch Set: Created 6 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 | « BUILD.gn ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »
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 b27365b7fc1607b78c23a261b9e5c2e88ec7e3e2..ca5877051be72630c44cda7eeb54920db6722bbf 100755
--- a/build/android/gyp/proguard.py
+++ b/build/android/gyp/proguard.py
@@ -13,7 +13,9 @@ from util import build_utils
def DoProguard(options):
injars = options.input_path
outjars = options.output_path
- classpath = build_utils.ParseGypList(options.classpath)
+ classpath = []
+ for arg in options.classpath:
+ classpath += build_utils.ParseGypList(arg)
classpath = list(set(classpath))
libraryjars = ':'.join(classpath)
# proguard does its own dependency checking, which can be avoided by deleting
@@ -29,8 +31,10 @@ def DoProguard(options):
build_utils.CheckOutput(proguard_cmd, print_stdout=True)
-def main():
+def main(args):
+ args = build_utils.ExpandFileArgs(args)
parser = optparse.OptionParser()
+ build_utils.AddDepfileOption(parser)
parser.add_option('--proguard-path',
help='Path to the proguard executable.')
parser.add_option('--input-path',
@@ -38,16 +42,22 @@ def main():
parser.add_option('--output-path', help='Path to the generated .jar file.')
parser.add_option('--proguard-config',
help='Path to the proguard configuration file.')
- parser.add_option('--classpath', help="Classpath for proguard.")
+ parser.add_option('--classpath', action='append',
+ help="Classpath for proguard.")
parser.add_option('--stamp', help='Path to touch on success.')
- options, _ = parser.parse_args()
+ options, _ = parser.parse_args(args)
DoProguard(options)
+ if options.depfile:
+ build_utils.WriteDepfile(
+ options.depfile,
+ build_utils.GetPythonDependencies())
+
if options.stamp:
build_utils.Touch(options.stamp)
if __name__ == '__main__':
- sys.exit(main())
+ sys.exit(main(sys.argv[1:]))
« no previous file with comments | « BUILD.gn ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698