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

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

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 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
« no previous file with comments | « build/android/gyp/process_resources.py ('k') | build/android/gyp/push_libraries.py » ('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
new file mode 100755
index 0000000000000000000000000000000000000000..5127100a890ce5545f6b3c89c02a43651c6767e3
--- /dev/null
+++ b/build/android/gyp/proguard.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+#
+# Copyright 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import optparse
+import sys
+
+from util import build_utils
+from util import proguard_util
+
+def DoProguard(options):
+ proguard = proguard_util.ProguardCmdBuilder(options.proguard_path)
+ proguard.injars(build_utils.ParseGypList(options.input_paths))
+ proguard.configs(build_utils.ParseGypList(options.proguard_configs))
+ proguard.outjar(options.output_path)
+
+ if options.mapping:
+ proguard.mapping(options.mapping)
+
+ if options.is_test:
+ proguard.is_test(True)
+
+ classpath = []
+ for arg in options.classpath:
+ classpath += build_utils.ParseGypList(arg)
+ classpath = list(set(classpath))
+ proguard.libraryjars(classpath)
+
+ proguard.CheckOutput()
+
+ return proguard.GetInputs()
+
+
+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-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',
+ 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',
+ help='If true, extra proguard options for instrumentation tests will be '
+ 'added.')
+ parser.add_option('--classpath', action='append',
+ help='Classpath for proguard.')
+ parser.add_option('--stamp', help='Path to touch on success.')
+
+ options, _ = parser.parse_args(args)
+
+ inputs = DoProguard(options)
+
+ if options.depfile:
+ build_utils.WriteDepfile(
+ options.depfile,
+ inputs + build_utils.GetPythonDependencies())
+
+ if options.stamp:
+ build_utils.Touch(options.stamp)
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1:]))
« no previous file with comments | « build/android/gyp/process_resources.py ('k') | build/android/gyp/push_libraries.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698