OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 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 """Writes a build_config file. | 7 """Writes a build_config file. |
8 | 8 |
9 The build_config file for a target is a json file containing information about | 9 The build_config file for a target is a json file containing information about |
10 how to build that target based on the target's dependencies. This includes | 10 how to build that target based on the target's dependencies. This includes |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 | 403 |
404 if deps_require_android and not options.requires_android: | 404 if deps_require_android and not options.requires_android: |
405 raise Exception('Some deps require building for the Android platform: ' + | 405 raise Exception('Some deps require building for the Android platform: ' + |
406 str(deps_require_android)) | 406 str(deps_require_android)) |
407 | 407 |
408 if deps_not_support_android and options.supports_android: | 408 if deps_not_support_android and options.supports_android: |
409 raise Exception('Not all deps support the Android platform: ' + | 409 raise Exception('Not all deps support the Android platform: ' + |
410 str(deps_not_support_android)) | 410 str(deps_not_support_android)) |
411 | 411 |
412 if options.type in ('java_binary', 'java_library', 'android_apk'): | 412 if options.type in ('java_binary', 'java_library', 'android_apk'): |
413 deps_info['resources_deps'] = [c['path'] for c in all_resources_deps] | |
414 deps_info['jar_path'] = options.jar_path | 413 deps_info['jar_path'] = options.jar_path |
415 if options.type == 'android_apk' or options.supports_android: | 414 if options.type == 'android_apk' or options.supports_android: |
416 deps_info['dex_path'] = options.dex_path | 415 deps_info['dex_path'] = options.dex_path |
417 if options.type == 'android_apk': | 416 if options.type == 'android_apk': |
418 deps_info['apk_path'] = options.apk_path | 417 deps_info['apk_path'] = options.apk_path |
419 deps_info['incremental_apk_path'] = options.incremental_apk_path | 418 deps_info['incremental_apk_path'] = options.incremental_apk_path |
420 deps_info['incremental_install_script_path'] = ( | 419 deps_info['incremental_install_script_path'] = ( |
421 options.incremental_install_script_path) | 420 options.incremental_install_script_path) |
422 | 421 |
423 # Classpath values filled in below (after applying tested_apk_config). | 422 # Classpath values filled in below (after applying tested_apk_config). |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 _MergeAssets(deps.All('android_assets'))) | 598 _MergeAssets(deps.All('android_assets'))) |
600 | 599 |
601 build_utils.WriteJson(config, options.build_config, only_if_changed=True) | 600 build_utils.WriteJson(config, options.build_config, only_if_changed=True) |
602 | 601 |
603 if options.depfile: | 602 if options.depfile: |
604 build_utils.WriteDepfile(options.depfile, all_inputs) | 603 build_utils.WriteDepfile(options.depfile, all_inputs) |
605 | 604 |
606 | 605 |
607 if __name__ == '__main__': | 606 if __name__ == '__main__': |
608 sys.exit(main(sys.argv[1:])) | 607 sys.exit(main(sys.argv[1:])) |
OLD | NEW |