Index: build/config/android/rules.gni |
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni |
index 6e27ce4de82cc4e629fb40817d6f6b1c619d2c5a..d6381563a189d84a7369bf98b0900fd4de2d3a19 100644 |
--- a/build/config/android/rules.gni |
+++ b/build/config/android/rules.gni |
@@ -938,8 +938,8 @@ template("junit_binary") { |
"//testing/android/junit:junit_test_support", |
"//third_party/junit", |
"//third_party/mockito:mockito_java", |
- "//third_party/robolectric:robolectric_java", |
"//third_party/robolectric:android-all-4.3_r2-robolectric-0", |
+ "//third_party/robolectric:robolectric_java", |
] |
} |
} |
@@ -1371,6 +1371,7 @@ template("android_apk") { |
type = "android_apk" |
jar_path = _jar_path |
dex_path = final_dex_path |
+ apk_path = _final_apk_path |
resources_zip = resources_zip_path |
build_config = _build_config |
android_manifest = _android_manifest |
@@ -1527,8 +1528,8 @@ template("android_apk") { |
proguard(_proguard_target) { |
deps = [ |
":$build_config_target", |
- ":$process_resources_target", |
":$java_target", |
+ ":$process_resources_target", |
] |
inputs = [ |
_build_config, |
@@ -1708,8 +1709,8 @@ template("android_apk") { |
native_libs_dir = _native_libs_dir |
deps = [ |
- ":${_prepare_native_target_name}", |
":${_manifest_rule}", |
+ ":${_prepare_native_target_name}", |
] |
incremental_deps = deps |
} |
@@ -1770,8 +1771,8 @@ template("android_apk") { |
# actual target, but instead loads them at runtime, we need to explicitly |
# depend on them here. |
public_deps = [ |
- ":${_template_name}__create_incremental", |
":${_create_incremental_script_rule_name}", |
+ ":${_template_name}__create_incremental", |
":${java_target}", |
] |
if (_native_libs != []) { |
@@ -1824,35 +1825,36 @@ template("android_apk") { |
# ] |
# } |
template("instrumentation_test_apk") { |
- set_sources_assignment_filter([]) |
testonly = true |
- _template_name = target_name |
+ _apk_target_name = "${target_name}__apk" |
+ _test_runner_target_name = "${target_name}__test_runner_script" |
- if (defined(invoker.apk_name)) { |
- test_runner_data_dep = [ ":${_template_name}__test_runner_script" ] |
- test_runner_script("${_template_name}__test_runner_script") { |
- forward_variables_from(invoker, [ "isolate_file" ]) |
- test_name = invoker.target_name |
- test_type = "instrumentation" |
- test_apk = invoker.apk_name |
- } |
+ test_runner_script(_test_runner_target_name) { |
+ forward_variables_from(invoker, [ "isolate_file" ]) |
+ test_name = invoker.target_name |
+ test_type = "instrumentation" |
+ apk_target = ":$_apk_target_name" |
} |
- android_apk(target_name) { |
+ android_apk(_apk_target_name) { |
deps = [] |
data_deps = [] |
forward_variables_from(invoker, "*") |
+ deps += [ "//testing/android/broker:broker_java" ] |
data_deps += [ |
"//testing/android/driver:driver_apk", |
"//tools/android/forwarder2", |
"//tools/android/md5sum", |
] |
- if (defined(test_runner_data_dep)) { |
- data_deps += test_runner_data_dep |
- } |
- deps += [ "//testing/android/broker:broker_java" ] |
run_findbugs = false |
} |
+ |
+ group(target_name) { |
+ public_deps = [ |
+ ":$_apk_target_name", |
+ ":$_test_runner_target_name", |
+ ] |
+ } |
} |
# Declare an Android gtest apk |