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 optparse | 7 import optparse |
8 import os | 8 import os |
9 import shutil | 9 import shutil |
10 import re | 10 import re |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 '--use-errorprone-path', | 307 '--use-errorprone-path', |
308 help='Use the Errorprone compiler at this path.') | 308 help='Use the Errorprone compiler at this path.') |
309 parser.add_option('--jar-path', help='Jar output path.') | 309 parser.add_option('--jar-path', help='Jar output path.') |
310 parser.add_option('--stamp', help='Path to touch on success.') | 310 parser.add_option('--stamp', help='Path to touch on success.') |
311 | 311 |
312 options, args = parser.parse_args(argv) | 312 options, args = parser.parse_args(argv) |
313 build_utils.CheckOptions(options, parser, required=('jar_path',)) | 313 build_utils.CheckOptions(options, parser, required=('jar_path',)) |
314 | 314 |
315 bootclasspath = [] | 315 bootclasspath = [] |
316 for arg in options.bootclasspath: | 316 for arg in options.bootclasspath: |
317 bootclasspath += build_utils.ParseGypList(arg) | 317 bootclasspath += build_utils.ParseGnList(arg) |
318 options.bootclasspath = bootclasspath | 318 options.bootclasspath = bootclasspath |
319 | 319 |
320 classpath = [] | 320 classpath = [] |
321 for arg in options.classpath: | 321 for arg in options.classpath: |
322 classpath += build_utils.ParseGypList(arg) | 322 classpath += build_utils.ParseGnList(arg) |
323 options.classpath = classpath | 323 options.classpath = classpath |
324 | 324 |
325 java_srcjars = [] | 325 java_srcjars = [] |
326 for arg in options.java_srcjars: | 326 for arg in options.java_srcjars: |
327 java_srcjars += build_utils.ParseGypList(arg) | 327 java_srcjars += build_utils.ParseGnList(arg) |
328 options.java_srcjars = java_srcjars | 328 options.java_srcjars = java_srcjars |
329 | 329 |
330 additional_jar_files = [] | 330 additional_jar_files = [] |
331 for arg in options.additional_jar_files or []: | 331 for arg in options.additional_jar_files or []: |
332 filepath, jar_filepath = arg.split(':') | 332 filepath, jar_filepath = arg.split(':') |
333 additional_jar_files.append((filepath, jar_filepath)) | 333 additional_jar_files.append((filepath, jar_filepath)) |
334 options.additional_jar_files = additional_jar_files | 334 options.additional_jar_files = additional_jar_files |
335 | 335 |
336 if options.src_gendirs: | 336 if options.src_gendirs: |
337 options.src_gendirs = build_utils.ParseGypList(options.src_gendirs) | 337 options.src_gendirs = build_utils.ParseGnList(options.src_gendirs) |
338 | 338 |
339 options.javac_includes = build_utils.ParseGypList(options.javac_includes) | 339 options.javac_includes = build_utils.ParseGnList(options.javac_includes) |
340 options.jar_excluded_classes = ( | 340 options.jar_excluded_classes = ( |
341 build_utils.ParseGypList(options.jar_excluded_classes)) | 341 build_utils.ParseGnList(options.jar_excluded_classes)) |
342 | 342 |
343 java_files = [] | 343 java_files = [] |
344 for arg in args: | 344 for arg in args: |
345 # Interpret a path prefixed with @ as a file containing a list of sources. | 345 # Interpret a path prefixed with @ as a file containing a list of sources. |
346 if arg.startswith('@'): | 346 if arg.startswith('@'): |
347 java_files.extend(build_utils.ReadSourcesList(arg[1:])) | 347 java_files.extend(build_utils.ReadSourcesList(arg[1:])) |
348 else: | 348 else: |
349 java_files.append(arg) | 349 java_files.append(arg) |
350 | 350 |
351 return options, java_files | 351 return options, java_files |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 options, | 432 options, |
433 input_paths=input_paths, | 433 input_paths=input_paths, |
434 input_strings=javac_cmd, | 434 input_strings=javac_cmd, |
435 output_paths=output_paths, | 435 output_paths=output_paths, |
436 force=force, | 436 force=force, |
437 pass_changes=True) | 437 pass_changes=True) |
438 | 438 |
439 | 439 |
440 if __name__ == '__main__': | 440 if __name__ == '__main__': |
441 sys.exit(main(sys.argv[1:])) | 441 sys.exit(main(sys.argv[1:])) |
OLD | NEW |