Index: build/config/android/rules.gni |
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni |
index 5cec22d26b9800531cafc263258fc9132d38ea29..546f599f773134fdf12c321f1d29824fa729f791 100644 |
--- a/build/config/android/rules.gni |
+++ b/build/config/android/rules.gni |
@@ -1535,6 +1535,9 @@ template("android_apk") { |
if (defined(invoker.deps)) { |
deps += invoker.deps |
} |
+ if (defined(invoker.apk_under_test)) { |
+ deps += [ "${invoker.apk_under_test}__java" ] |
+ } |
} |
# TODO(cjhopman): This is only ever needed to calculate the list of tests to |
@@ -1590,12 +1593,23 @@ template("android_apk") { |
] + _proguard_configs |
output_jar_path = _proguard_jar_path |
- rebased_proguard_configs = rebase_path(_proguard_configs, root_build_dir) |
+ _rebased_proguard_configs = rebase_path(_proguard_configs, root_build_dir) |
args = [ |
- "--proguard-configs=$rebased_proguard_configs", |
- "--tested-apk-info=@FileArg($_rebased_build_config:proguard:tested_apk_info)", |
+ "--proguard-configs=$_rebased_proguard_configs", |
"--input-paths=@FileArg($_rebased_build_config:proguard:input_paths)", |
] |
+ if (defined(invoker.apk_under_test)) { |
+ deps += [ |
+ "${invoker.apk_under_test}__build_config", |
+ "${invoker.apk_under_test}__proguard", |
+ ] |
+ _apk_under_test_build_config = |
+ get_label_info(invoker.apk_under_test, "target_gen_dir") + "/" + |
+ get_label_info(invoker.apk_under_test, "name") + ".build_config" |
+ _rebased_apk_under_test_build_config = |
+ rebase_path(_apk_under_test_build_config, root_build_dir) |
+ args += [ "--tested-apk-info=@FileArg($_rebased_apk_under_test_build_config:deps_info:proguard_info)" ] |
+ } |
} |
_dex_sources = [ _proguard_jar_path ] |
_dex_deps = [ ":$_proguard_target" ] |
@@ -1996,6 +2010,7 @@ template("instrumentation_test_apk") { |
# Required by test runner to enumerate test list. |
":${_apk_target_name}_dist_ijar", |
+ invoker.apk_under_test, |
] |
} |
group("${target_name}_incremental") { |