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

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

Issue 197693002: [Android] Lint build/android/gyp/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: now using extra_paths_list to avoid F0401s Created 6 years, 9 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/create_standalone_apk.py ('k') | build/android/gyp/emma_instr.py » ('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 optparse 7 import optparse
8 import os 8 import os
9 import sys 9 import sys
10 10
(...skipping 12 matching lines...) Expand all
23 record_path = '%s.md5.stamp' % options.dex_path 23 record_path = '%s.md5.stamp' % options.dex_path
24 md5_check.CallAndRecordIfStale( 24 md5_check.CallAndRecordIfStale(
25 lambda: build_utils.CheckOutput(dex_cmd, print_stderr=False), 25 lambda: build_utils.CheckOutput(dex_cmd, print_stderr=False),
26 record_path=record_path, 26 record_path=record_path,
27 input_paths=paths, 27 input_paths=paths,
28 input_strings=dex_cmd) 28 input_strings=dex_cmd)
29 29
30 build_utils.Touch(options.dex_path) 30 build_utils.Touch(options.dex_path)
31 31
32 32
33 def main(argv): 33 def main():
34 parser = optparse.OptionParser() 34 parser = optparse.OptionParser()
35 parser.add_option('--android-sdk-tools', 35 parser.add_option('--android-sdk-tools',
36 help='Android sdk build tools directory.') 36 help='Android sdk build tools directory.')
37 parser.add_option('--dex-path', help='Dex output path.') 37 parser.add_option('--dex-path', help='Dex output path.')
38 parser.add_option('--configuration-name', 38 parser.add_option('--configuration-name',
39 help='The build CONFIGURATION_NAME.') 39 help='The build CONFIGURATION_NAME.')
40 parser.add_option('--proguard-enabled', 40 parser.add_option('--proguard-enabled',
41 help='"true" if proguard is enabled.') 41 help='"true" if proguard is enabled.')
42 parser.add_option('--proguard-enabled-input-path', 42 parser.add_option('--proguard-enabled-input-path',
43 help=('Path to dex in Release mode when proguard ' 43 help=('Path to dex in Release mode when proguard '
44 'is enabled.')) 44 'is enabled.'))
45 parser.add_option('--no-locals', 45 parser.add_option('--no-locals',
46 help='Exclude locals list from the dex file.') 46 help='Exclude locals list from the dex file.')
47 47
48 options, paths = parser.parse_args() 48 options, paths = parser.parse_args()
49 49
50 if (options.proguard_enabled == 'true' 50 if (options.proguard_enabled == 'true'
51 and options.configuration_name == 'Release'): 51 and options.configuration_name == 'Release'):
52 paths = [options.proguard_enabled_input_path] 52 paths = [options.proguard_enabled_input_path]
53 53
54 DoDex(options, paths) 54 DoDex(options, paths)
55 55
56 56
57 if __name__ == '__main__': 57 if __name__ == '__main__':
58 sys.exit(main(sys.argv)) 58 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/gyp/create_standalone_apk.py ('k') | build/android/gyp/emma_instr.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698