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

Side by Side Diff: build/android/gyp/dex.py

Issue 15231006: [Android] Fix proguard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add help messages Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « build/android/dex_action.gypi ('k') | build/java.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 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 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import fnmatch 7 import fnmatch
8 import optparse 8 import optparse
9 import os 9 import os
10 import sys 10 import sys
(...skipping 13 matching lines...) Expand all
24 input_paths=paths, 24 input_paths=paths,
25 input_strings=dex_cmd) 25 input_strings=dex_cmd)
26 26
27 build_utils.Touch(options.dex_path) 27 build_utils.Touch(options.dex_path)
28 28
29 29
30 def main(argv): 30 def main(argv):
31 parser = optparse.OptionParser() 31 parser = optparse.OptionParser()
32 parser.add_option('--android-sdk-root', help='Android sdk root directory.') 32 parser.add_option('--android-sdk-root', help='Android sdk root directory.')
33 parser.add_option('--dex-path', help='Dex output path.') 33 parser.add_option('--dex-path', help='Dex output path.')
34 parser.add_option('--configuration-name',
35 help='The build CONFIGURATION_NAME.')
36 parser.add_option('--proguard-enabled',
37 help='"true" if proguard is enabled.')
38 parser.add_option('--proguard-enabled-input-path',
39 help='Path to dex in Release mode when proguard is enabled.')
34 parser.add_option('--stamp', help='Path to touch on success.') 40 parser.add_option('--stamp', help='Path to touch on success.')
35 41
36 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja. 42 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
37 parser.add_option('--ignore', help='Ignored.') 43 parser.add_option('--ignore', help='Ignored.')
38 44
39 options, paths = parser.parse_args() 45 options, paths = parser.parse_args()
40 46
47 if (options.proguard_enabled == "true"
48 and options.configuration_name == "Release"):
49 paths = [options.proguard_enabled_input_path]
50
41 DoDex(options, paths) 51 DoDex(options, paths)
42 52
43 if options.stamp: 53 if options.stamp:
44 build_utils.Touch(options.stamp) 54 build_utils.Touch(options.stamp)
45 55
46 56
47 if __name__ == '__main__': 57 if __name__ == '__main__':
48 sys.exit(main(sys.argv)) 58 sys.exit(main(sys.argv))
49 59
OLDNEW
« no previous file with comments | « build/android/dex_action.gypi ('k') | build/java.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698