Index: build/config/android/internal_rules.gni |
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni |
index 52e38512e7e3f11696505f5f42d3da38c95904b1..de6a33f5be8aa733547f5ce9f7250e30d6f244f2 100644 |
--- a/build/config/android/internal_rules.gni |
+++ b/build/config/android/internal_rules.gni |
@@ -1127,6 +1127,7 @@ template("create_apk") { |
} |
_finalize_apk_rule_name = "${target_name}__finalize" |
+ _output_apks = [ _final_apk_path ] |
finalize_apk(_finalize_apk_rule_name) { |
forward_variables_from(invoker, [ "page_align_shared_libraries" ]) |
@@ -1137,7 +1138,7 @@ template("create_apk") { |
keystore_password = _keystore_password |
rezip_apk = _load_library_from_apk |
- public_deps = [ |
+ deps = [ |
# Generator of the _packaged_apk_path this target takes as input. |
":$package_target", |
] |
@@ -1151,7 +1152,7 @@ template("create_apk") { |
keystore_name = _keystore_name |
keystore_password = _keystore_password |
- public_deps = [ |
+ deps = [ |
":$_incremental_package_target", |
] |
} |
@@ -1159,14 +1160,16 @@ template("create_apk") { |
_split_deps = [] |
template("finalize_split") { |
+ _output_paths = process_file_template( |
+ [ _final_apk_path ], |
+ "{{source_dir}}/{{source_name_part}}-${_type}-${_config}.apk") |
+ _output_apk_path = _output_paths[0] |
+ _output_apks += [ _output_apk_path ] |
finalize_apk(target_name) { |
_config = invoker.split_config |
_type = invoker.split_type |
input_apk_path = "${_resource_packaged_apk_path}_${_config}" |
- _output_paths = process_file_template( |
- [ _final_apk_path ], |
- "{{source_dir}}/{{source_name_part}}-${_type}-${_config}.apk") |
- output_apk_path = _output_paths[0] |
+ output_apk_path = _output_apk_path |
keystore_path = _keystore_path |
keystore_name = _keystore_name |
keystore_password = _keystore_password |
@@ -1193,8 +1196,12 @@ template("create_apk") { |
_split_deps += [ ":$_split_rule" ] |
} |
+ _all_apk_deps = [ ":${_finalize_apk_rule_name}" ] + _split_deps |
group(target_name) { |
- public_deps = [ ":${_finalize_apk_rule_name}" ] + _split_deps |
+ public_deps = _all_apk_deps |
+ } |
+ group("${target_name}__data") { |
+ data = _output_apks |
} |
group("${target_name}_incremental") { |
public_deps = [ ":${_incremental_finalize_apk_rule_name}" ] + _split_deps |