| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
| 6 | 6 |
| 7 assert(is_android) | 7 assert(is_android) |
| 8 | 8 |
| 9 | 9 |
| 10 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) | 10 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 assert(defined(invoker.build_config)) | 67 assert(defined(invoker.build_config)) |
| 68 | 68 |
| 69 type = invoker.type | 69 type = invoker.type |
| 70 build_config = invoker.build_config | 70 build_config = invoker.build_config |
| 71 | 71 |
| 72 assert(type == "android_apk" || type == "android_library" || type == "android_
resources") | 72 assert(type == "android_apk" || type == "android_library" || type == "android_
resources") |
| 73 | 73 |
| 74 action(target_name) { | 74 action(target_name) { |
| 75 script = "//build/android/gyp/write_build_config.py" | 75 script = "//build/android/gyp/write_build_config.py" |
| 76 depfile = "$target_gen_dir/$target_name.d" | 76 depfile = "$target_gen_dir/$target_name.d" |
| 77 inputs = [] |
| 77 | 78 |
| 78 deps = [] | 79 deps = [] |
| 79 if (defined(invoker.deps)) { | 80 if (defined(invoker.deps)) { |
| 80 deps += invoker.deps | 81 deps += invoker.deps |
| 81 } | 82 } |
| 82 if (defined(invoker.testonly)) { | 83 if (defined(invoker.testonly)) { |
| 83 testonly = invoker.testonly | 84 testonly = invoker.testonly |
| 84 } | 85 } |
| 85 | 86 |
| 86 outputs = [ | 87 outputs = [ |
| (...skipping 21 matching lines...) Expand all Loading... |
| 108 "--jar-path", rebase_path(invoker.jar_path, root_build_dir), | 109 "--jar-path", rebase_path(invoker.jar_path, root_build_dir), |
| 109 "--dex-path", rebase_path(invoker.dex_path, root_build_dir), | 110 "--dex-path", rebase_path(invoker.dex_path, root_build_dir), |
| 110 ] | 111 ] |
| 111 } | 112 } |
| 112 | 113 |
| 113 if (type == "android_resources" || type == "android_apk") { | 114 if (type == "android_resources" || type == "android_apk") { |
| 114 assert(defined(invoker.resources_zip)) | 115 assert(defined(invoker.resources_zip)) |
| 115 args += [ | 116 args += [ |
| 116 "--resources-zip", rebase_path(invoker.resources_zip, root_build_dir), | 117 "--resources-zip", rebase_path(invoker.resources_zip, root_build_dir), |
| 117 ] | 118 ] |
| 119 if (defined(invoker.android_manifest)) { |
| 120 inputs += [ |
| 121 invoker.android_manifest |
| 122 ] |
| 123 args += [ |
| 124 "--android-manifest", rebase_path(invoker.android_manifest, root_build
_dir), |
| 125 ] |
| 126 } |
| 127 if (defined(invoker.custom_package)) { |
| 128 args += [ |
| 129 "--package-name", invoker.custom_package |
| 130 ] |
| 131 } |
| 118 } | 132 } |
| 119 | 133 |
| 120 if (type == "android_apk") { | 134 if (type == "android_apk") { |
| 121 if (defined(invoker.native_libs)) { | 135 if (defined(invoker.native_libs)) { |
| 122 rebased_native_libs = rebase_path(invoker.native_libs, root_build_dir) | 136 rebased_native_libs = rebase_path(invoker.native_libs, root_build_dir) |
| 123 rebased_android_readelf = rebase_path(android_readelf, root_build_dir) | 137 rebased_android_readelf = rebase_path(android_readelf, root_build_dir) |
| 124 args += [ | 138 args += [ |
| 125 "--native-libs=$rebased_native_libs", | 139 "--native-libs=$rebased_native_libs", |
| 126 "--readelf-path=$rebased_android_readelf", | 140 "--readelf-path=$rebased_android_readelf", |
| 127 ] | 141 ] |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 "--depfile", rebase_path(depfile, root_build_dir), | 650 "--depfile", rebase_path(depfile, root_build_dir), |
| 637 "--android-sdk", rebase_path(android_sdk, root_build_dir), | 651 "--android-sdk", rebase_path(android_sdk, root_build_dir), |
| 638 "--android-sdk-tools", rebase_path(android_sdk_build_tools, root_build_dir
), | 652 "--android-sdk-tools", rebase_path(android_sdk_build_tools, root_build_dir
), |
| 639 "--android-manifest", rebase_path(android_manifest, root_build_dir), | 653 "--android-manifest", rebase_path(android_manifest, root_build_dir), |
| 640 | 654 |
| 641 "--resource-dirs=$rebase_resource_dirs", | 655 "--resource-dirs=$rebase_resource_dirs", |
| 642 "--srcjar-out", rebase_path(srcjar_path, root_build_dir), | 656 "--srcjar-out", rebase_path(srcjar_path, root_build_dir), |
| 643 "--resource-zip-out", rebase_path(zip_path, root_build_dir), | 657 "--resource-zip-out", rebase_path(zip_path, root_build_dir), |
| 644 | 658 |
| 645 "--dependencies-res-zips=@FileArg($rebase_build_config:resources:dependenc
y_zips)", | 659 "--dependencies-res-zips=@FileArg($rebase_build_config:resources:dependenc
y_zips)", |
| 660 "--extra-res-packages=@FileArg($rebase_build_config:resources:extra_packag
e_names)", |
| 646 ] | 661 ] |
| 647 | 662 |
| 648 if (non_constant_id) { | 663 if (non_constant_id) { |
| 649 args += [ "--non-constant-id" ] | 664 args += [ "--non-constant-id" ] |
| 650 } | 665 } |
| 651 | 666 |
| 652 if (defined(invoker.custom_package)) { | 667 if (defined(invoker.custom_package)) { |
| 653 args += [ | 668 args += [ |
| 654 "--custom-package", invoker.custom_package, | 669 "--custom-package", invoker.custom_package, |
| 655 ] | 670 ] |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 "--dest", rebase_path(invoker.dest, root_build_dir), | 706 "--dest", rebase_path(invoker.dest, root_build_dir), |
| 692 ] | 707 ] |
| 693 if (defined(invoker.args)) { | 708 if (defined(invoker.args)) { |
| 694 args += invoker.args | 709 args += invoker.args |
| 695 } | 710 } |
| 696 if (defined(invoker.clear_dir) && invoker.clear_dir) { | 711 if (defined(invoker.clear_dir) && invoker.clear_dir) { |
| 697 args += ["--clear"] | 712 args += ["--clear"] |
| 698 } | 713 } |
| 699 } | 714 } |
| 700 } | 715 } |
| OLD | NEW |