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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 _asset_location = invoker.asset_location | 253 _asset_location = invoker.asset_location |
254 } | 254 } |
255 | 255 |
256 _version_code = invoker.version_code | 256 _version_code = invoker.version_code |
257 _version_name = invoker.version_name | 257 _version_name = invoker.version_name |
258 | 258 |
259 _base_apk_path = _base_path + ".apk_intermediates" | 259 _base_apk_path = _base_path + ".apk_intermediates" |
260 | 260 |
261 _resource_packaged_apk_path = _base_apk_path + ".ap_" | 261 _resource_packaged_apk_path = _base_apk_path + ".ap_" |
262 _packaged_apk_path = _base_apk_path + ".unfinished.apk" | 262 _packaged_apk_path = _base_apk_path + ".unfinished.apk" |
| 263 _shared_resources = defined(invoker.shared_resources) && invoker.shared_resour
ces |
263 | 264 |
264 | 265 |
265 _configuration_name = "Release" | 266 _configuration_name = "Release" |
266 if (is_debug) { | 267 if (is_debug) { |
267 _configuration_name = "Debug" | 268 _configuration_name = "Debug" |
268 } | 269 } |
269 | 270 |
270 action("${target_name}__package_resources") { | 271 action("${target_name}__package_resources") { |
271 deps = _deps | 272 deps = _deps |
272 | 273 |
(...skipping 15 matching lines...) Expand all Loading... |
288 | 289 |
289 "--android-manifest", rebase_path(_android_manifest, root_build_dir), | 290 "--android-manifest", rebase_path(_android_manifest, root_build_dir), |
290 "--version-code", _version_code, | 291 "--version-code", _version_code, |
291 "--version-name", _version_name, | 292 "--version-name", _version_name, |
292 | 293 |
293 "--asset-dir", rebase_path(_asset_location, root_build_dir), | 294 "--asset-dir", rebase_path(_asset_location, root_build_dir), |
294 "--resource-zips=$_rebased_resources_zips", | 295 "--resource-zips=$_rebased_resources_zips", |
295 | 296 |
296 "--apk-path", rebase_path(_resource_packaged_apk_path, root_build_dir), | 297 "--apk-path", rebase_path(_resource_packaged_apk_path, root_build_dir), |
297 ] | 298 ] |
| 299 |
| 300 if (_shared_resources) { |
| 301 args += ["--shared-resources"] |
| 302 } |
298 } | 303 } |
299 | 304 |
300 action("${target_name}__package") { | 305 action("${target_name}__package") { |
301 script = "//build/android/gyp/ant.py" | 306 script = "//build/android/gyp/ant.py" |
302 _ant_script = "//build/android/ant/apk-package.xml" | 307 _ant_script = "//build/android/ant/apk-package.xml" |
303 | 308 |
304 depfile = "$target_gen_dir/$target_name.d" | 309 depfile = "$target_gen_dir/$target_name.d" |
305 | 310 |
306 inputs = [ | 311 inputs = [ |
307 _dex_path, | 312 _dex_path, |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 if (defined(invoker.custom_package)) { | 716 if (defined(invoker.custom_package)) { |
712 args += [ | 717 args += [ |
713 "--custom-package", invoker.custom_package, | 718 "--custom-package", invoker.custom_package, |
714 ] | 719 ] |
715 } | 720 } |
716 | 721 |
717 if (defined(invoker.v14_verify_only) && invoker.v14_verify_only) { | 722 if (defined(invoker.v14_verify_only) && invoker.v14_verify_only) { |
718 args += ["--v14-verify-only"] | 723 args += ["--v14-verify-only"] |
719 } | 724 } |
720 | 725 |
| 726 if (defined(invoker.shared_resources) && |
| 727 invoker.shared_resources) { |
| 728 args += ["--shared-resources"] |
| 729 } |
| 730 |
721 if (defined(invoker.all_resources_zip_path)) { | 731 if (defined(invoker.all_resources_zip_path)) { |
722 all_resources_zip = invoker.all_resources_zip_path | 732 all_resources_zip = invoker.all_resources_zip_path |
723 outputs += [ all_resources_zip ] | 733 outputs += [ all_resources_zip ] |
724 args += [ | 734 args += [ |
725 "--all-resources-zip-out", rebase_path(all_resources_zip, root_build_dir
) | 735 "--all-resources-zip-out", rebase_path(all_resources_zip, root_build_dir
) |
726 ] | 736 ] |
727 } | 737 } |
728 | 738 |
729 if (defined(invoker.args)) { | 739 if (defined(invoker.args)) { |
730 args += invoker.args | 740 args += invoker.args |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 | 774 |
765 if (defined(invoker.clear_dir) && invoker.clear_dir) { | 775 if (defined(invoker.clear_dir) && invoker.clear_dir) { |
766 args += ["--clear"] | 776 args += ["--clear"] |
767 } | 777 } |
768 | 778 |
769 if (defined(invoker.args)) { | 779 if (defined(invoker.args)) { |
770 args += invoker.args | 780 args += invoker.args |
771 } | 781 } |
772 } | 782 } |
773 } | 783 } |
OLD | NEW |