OLD | NEW |
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 json | 7 import json |
8 import logging | 8 import logging |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 multidex_config = json.loads(multidex_config_file.read()) | 84 multidex_config = json.loads(multidex_config_file.read()) |
85 options.multi_dex = multidex_config.get('enabled', False) | 85 options.multi_dex = multidex_config.get('enabled', False) |
86 | 86 |
87 if options.multi_dex and not options.main_dex_list_path: | 87 if options.multi_dex and not options.main_dex_list_path: |
88 logging.warning('multidex cannot be enabled without --main-dex-list-path') | 88 logging.warning('multidex cannot be enabled without --main-dex-list-path') |
89 options.multi_dex = False | 89 options.multi_dex = False |
90 elif options.main_dex_list_path and not options.multi_dex: | 90 elif options.main_dex_list_path and not options.multi_dex: |
91 logging.warning('--main-dex-list-path is unused if multidex is not enabled') | 91 logging.warning('--main-dex-list-path is unused if multidex is not enabled') |
92 | 92 |
93 if options.inputs: | 93 if options.inputs: |
94 options.inputs = build_utils.ParseGypList(options.inputs) | 94 options.inputs = build_utils.ParseGnList(options.inputs) |
95 _CheckFilePathsEndWithJar(parser, options.inputs) | 95 _CheckFilePathsEndWithJar(parser, options.inputs) |
96 if options.excluded_paths: | 96 if options.excluded_paths: |
97 options.excluded_paths = build_utils.ParseGypList(options.excluded_paths) | 97 options.excluded_paths = build_utils.ParseGnList(options.excluded_paths) |
98 | 98 |
99 if options.proguard_enabled_input_path: | 99 if options.proguard_enabled_input_path: |
100 _CheckFilePathEndsWithJar(parser, options.proguard_enabled_input_path) | 100 _CheckFilePathEndsWithJar(parser, options.proguard_enabled_input_path) |
101 _CheckFilePathsEndWithJar(parser, paths) | 101 _CheckFilePathsEndWithJar(parser, paths) |
102 | 102 |
103 return options, paths | 103 return options, paths |
104 | 104 |
105 | 105 |
106 def _AllSubpathsAreClassFiles(paths, changes): | 106 def _AllSubpathsAreClassFiles(paths, changes): |
107 for path in paths: | 107 for path in paths: |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 options, | 237 options, |
238 input_paths=input_paths, | 238 input_paths=input_paths, |
239 input_strings=dex_cmd, | 239 input_strings=dex_cmd, |
240 output_paths=output_paths, | 240 output_paths=output_paths, |
241 force=force, | 241 force=force, |
242 pass_changes=True) | 242 pass_changes=True) |
243 | 243 |
244 | 244 |
245 if __name__ == '__main__': | 245 if __name__ == '__main__': |
246 sys.exit(main(sys.argv[1:])) | 246 sys.exit(main(sys.argv[1:])) |
OLD | NEW |