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

Side by Side 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, 5 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 import optparse
8 import sys
9
10 from util import build_utils
11 from util import proguard_util
12
13 def DoProguard(options):
14 proguard = proguard_util.ProguardCmdBuilder(options.proguard_path)
15 proguard.injars(build_utils.ParseGypList(options.input_paths))
16 proguard.configs(build_utils.ParseGypList(options.proguard_configs))
17 proguard.outjar(options.output_path)
18
19 if options.mapping:
20 proguard.mapping(options.mapping)
21
22 if options.is_test:
23 proguard.is_test(True)
24
25 classpath = []
26 for arg in options.classpath:
27 classpath += build_utils.ParseGypList(arg)
28 classpath = list(set(classpath))
29 proguard.libraryjars(classpath)
30
31 proguard.CheckOutput()
32
33 return proguard.GetInputs()
34
35
36 def main(args):
37 args = build_utils.ExpandFileArgs(args)
38 parser = optparse.OptionParser()
39 build_utils.AddDepfileOption(parser)
40 parser.add_option('--proguard-path',
41 help='Path to the proguard executable.')
42 parser.add_option('--input-paths',
43 help='Paths to the .jar files proguard should run on.')
44 parser.add_option('--output-path', help='Path to the generated .jar file.')
45 parser.add_option('--proguard-configs',
46 help='Paths to proguard configuration files.')
47 parser.add_option('--mapping', help='Path to proguard mapping to apply.')
48 parser.add_option('--is-test', action='store_true',
49 help='If true, extra proguard options for instrumentation tests will be '
50 'added.')
51 parser.add_option('--classpath', action='append',
52 help='Classpath for proguard.')
53 parser.add_option('--stamp', help='Path to touch on success.')
54
55 options, _ = parser.parse_args(args)
56
57 inputs = DoProguard(options)
58
59 if options.depfile:
60 build_utils.WriteDepfile(
61 options.depfile,
62 inputs + build_utils.GetPythonDependencies())
63
64 if options.stamp:
65 build_utils.Touch(options.stamp)
66
67
68 if __name__ == '__main__':
69 sys.exit(main(sys.argv[1:]))
OLDNEW
« 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