| 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 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
| 7 import("//build/config/zip.gni") | 7 import("//build/config/zip.gni") |
| 8 import("//third_party/ijar/ijar.gni") | 8 import("//third_party/ijar/ijar.gni") |
| 9 | 9 |
| 10 assert(is_android) | 10 assert(is_android) |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 _deps = invoker.deps | 839 _deps = invoker.deps |
| 840 } | 840 } |
| 841 _incremental_deps = [] | 841 _incremental_deps = [] |
| 842 if (defined(invoker.incremental_deps)) { | 842 if (defined(invoker.incremental_deps)) { |
| 843 _incremental_deps = invoker.incremental_deps | 843 _incremental_deps = invoker.incremental_deps |
| 844 } | 844 } |
| 845 _native_libs = [] | 845 _native_libs = [] |
| 846 if (defined(invoker.native_libs)) { | 846 if (defined(invoker.native_libs)) { |
| 847 _native_libs = invoker.native_libs | 847 _native_libs = invoker.native_libs |
| 848 } | 848 } |
| 849 _native_libs_even_when_incremental = [] |
| 850 if (defined(invoker.native_libs_even_when_incremental)) { |
| 851 _native_libs_even_when_incremental = |
| 852 invoker.native_libs_even_when_incremental |
| 853 } |
| 849 | 854 |
| 850 # TODO(agrieve): Remove support for asset_location in favor of using | 855 # TODO(agrieve): Remove support for asset_location in favor of using |
| 851 # android_assets() everywhere (http://crbug.com/547162). | 856 # android_assets() everywhere (http://crbug.com/547162). |
| 852 if (defined(invoker.asset_location)) { | 857 if (defined(invoker.asset_location)) { |
| 853 _asset_location = invoker.asset_location | 858 _asset_location = invoker.asset_location |
| 854 assert(_asset_location != "") # Mark as used. | 859 assert(_asset_location != "") # Mark as used. |
| 855 } | 860 } |
| 856 | 861 |
| 857 _version_code = invoker.version_code | 862 _version_code = invoker.version_code |
| 858 _version_name = invoker.version_name | 863 _version_name = invoker.version_name |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 package_apk(package_target) { | 1022 package_apk(package_target) { |
| 1018 forward_variables_from(invoker, | 1023 forward_variables_from(invoker, |
| 1019 [ | 1024 [ |
| 1020 "assets_build_config", | 1025 "assets_build_config", |
| 1021 "emma_instrument", | 1026 "emma_instrument", |
| 1022 "native_lib_placeholders", | 1027 "native_lib_placeholders", |
| 1023 "native_libs_filearg", | 1028 "native_libs_filearg", |
| 1024 "write_asset_list", | 1029 "write_asset_list", |
| 1025 ]) | 1030 ]) |
| 1026 deps = _deps + [ ":${_package_resources_target_name}" ] | 1031 deps = _deps + [ ":${_package_resources_target_name}" ] |
| 1027 native_libs = _native_libs | 1032 native_libs = _native_libs + _native_libs_even_when_incremental |
| 1028 | 1033 |
| 1029 if (defined(_dex_path)) { | 1034 if (defined(_dex_path)) { |
| 1030 dex_path = _dex_path | 1035 dex_path = _dex_path |
| 1031 } | 1036 } |
| 1032 | 1037 |
| 1033 output_apk_path = _packaged_apk_path | 1038 output_apk_path = _packaged_apk_path |
| 1034 resource_packaged_apk_path = _resource_packaged_apk_path | 1039 resource_packaged_apk_path = _resource_packaged_apk_path |
| 1035 } | 1040 } |
| 1036 | 1041 |
| 1037 _incremental_package_target = "${target_name}_incremental__package" | 1042 _incremental_package_target = "${target_name}_incremental__package" |
| 1038 package_apk(_incremental_package_target) { | 1043 package_apk(_incremental_package_target) { |
| 1039 forward_variables_from(invoker, | 1044 forward_variables_from(invoker, |
| 1040 [ | 1045 [ |
| 1041 "assets_build_config", | 1046 "assets_build_config", |
| 1042 "emma_instrument", | 1047 "emma_instrument", |
| 1043 ]) | 1048 ]) |
| 1044 _dex_target = "//build/android/incremental_install:bootstrap_java__dex" | 1049 _dex_target = "//build/android/incremental_install:bootstrap_java__dex" |
| 1045 deps = _incremental_deps + [ | 1050 deps = _incremental_deps + [ |
| 1046 ":${_incremental_package_resources_target_name}", | 1051 ":${_incremental_package_resources_target_name}", |
| 1047 _dex_target, | 1052 _dex_target, |
| 1048 ] | 1053 ] |
| 1049 | 1054 |
| 1050 if (defined(_dex_path)) { | 1055 if (defined(_dex_path)) { |
| 1051 dex_path = | 1056 dex_path = |
| 1052 get_label_info(_dex_target, "target_gen_dir") + "/bootstrap.dex" | 1057 get_label_info(_dex_target, "target_gen_dir") + "/bootstrap.dex" |
| 1053 } | 1058 } |
| 1054 | 1059 |
| 1055 native_libs = [] | 1060 native_libs = _native_libs_even_when_incremental |
| 1056 | 1061 |
| 1057 # http://crbug.com/384638 | 1062 # http://crbug.com/384638 |
| 1058 _has_native_libs = | 1063 _has_native_libs = |
| 1059 defined(invoker.native_libs_filearg) || _native_libs != [] | 1064 defined(invoker.native_libs_filearg) || _native_libs != [] |
| 1060 if (_has_native_libs) { | 1065 if (_has_native_libs && _native_libs_even_when_incremental == []) { |
| 1061 native_lib_placeholders = [ "libfix.crbug.384638.so" ] | 1066 native_lib_placeholders = [ "libfix.crbug.384638.so" ] |
| 1062 } | 1067 } |
| 1063 | 1068 |
| 1064 output_apk_path = _incremental_packaged_apk_path | 1069 output_apk_path = _incremental_packaged_apk_path |
| 1065 resource_packaged_apk_path = _incremental_resource_packaged_apk_path | 1070 resource_packaged_apk_path = _incremental_resource_packaged_apk_path |
| 1066 } | 1071 } |
| 1067 | 1072 |
| 1068 _finalize_apk_rule_name = "${target_name}__finalize" | 1073 _finalize_apk_rule_name = "${target_name}__finalize" |
| 1069 finalize_apk(_finalize_apk_rule_name) { | 1074 finalize_apk(_finalize_apk_rule_name) { |
| 1070 input_apk_path = _packaged_apk_path | 1075 input_apk_path = _packaged_apk_path |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2000 ] | 2005 ] |
| 2001 args = [ | 2006 args = [ |
| 2002 "--depfile", | 2007 "--depfile", |
| 2003 rebase_path(depfile, root_build_dir), | 2008 rebase_path(depfile, root_build_dir), |
| 2004 "--script-output-path", | 2009 "--script-output-path", |
| 2005 rebase_path(generated_script, root_build_dir), | 2010 rebase_path(generated_script, root_build_dir), |
| 2006 ] | 2011 ] |
| 2007 args += test_runner_args | 2012 args += test_runner_args |
| 2008 } | 2013 } |
| 2009 } | 2014 } |
| OLD | NEW |