OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright 2015 The Chromium Authors. All rights reserved. | 3 # Copyright 2015 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 """Creates a script to run an "_incremental" .apk.""" | 7 """Creates a script to run an "_incremental" .apk.""" |
8 | 8 |
9 import argparse | 9 import argparse |
10 import os | 10 import os |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 parser.add_argument('--dex-file-list', | 109 parser.add_argument('--dex-file-list', |
110 help='GYP-list of dex files.') | 110 help='GYP-list of dex files.') |
111 parser.add_argument('--show-proguard-warning', | 111 parser.add_argument('--show-proguard-warning', |
112 action='store_true', | 112 action='store_true', |
113 default=False, | 113 default=False, |
114 help='Print a warning about proguard being disabled') | 114 help='Print a warning about proguard being disabled') |
115 parser.add_argument('--dont-even-try', | 115 parser.add_argument('--dont-even-try', |
116 help='Prints this message and exits.') | 116 help='Prints this message and exits.') |
117 | 117 |
118 options = parser.parse_args(args) | 118 options = parser.parse_args(args) |
119 options.dex_files += build_utils.ParseGypList(options.dex_file_list) | 119 options.dex_files += build_utils.ParseGnList(options.dex_file_list) |
120 all_libs = [] | 120 all_libs = [] |
121 for gyp_list in options.native_libs: | 121 for gyp_list in options.native_libs: |
122 all_libs.extend(build_utils.ParseGypList(gyp_list)) | 122 all_libs.extend(build_utils.ParseGnList(gyp_list)) |
123 options.native_libs = all_libs | 123 options.native_libs = all_libs |
124 return options | 124 return options |
125 | 125 |
126 | 126 |
127 def main(args): | 127 def main(args): |
128 options = _ParseArgs(args) | 128 options = _ParseArgs(args) |
129 | 129 |
130 def relativize(path): | 130 def relativize(path): |
131 script_dir = os.path.dirname(options.script_output_path) | 131 script_dir = os.path.dirname(options.script_output_path) |
132 return path and os.path.relpath(path, script_dir) | 132 return path and os.path.relpath(path, script_dir) |
(...skipping 18 matching lines...) Expand all Loading... |
151 os.chmod(options.script_output_path, 0750) | 151 os.chmod(options.script_output_path, 0750) |
152 | 152 |
153 if options.depfile: | 153 if options.depfile: |
154 build_utils.WriteDepfile( | 154 build_utils.WriteDepfile( |
155 options.depfile, | 155 options.depfile, |
156 build_utils.GetPythonDependencies()) | 156 build_utils.GetPythonDependencies()) |
157 | 157 |
158 | 158 |
159 if __name__ == '__main__': | 159 if __name__ == '__main__': |
160 sys.exit(main(sys.argv[1:])) | 160 sys.exit(main(sys.argv[1:])) |
OLD | NEW |