Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(808)

Unified Diff: build/config/android/rules.gni

Issue 2819983002: (Reland) Expose resources in Robolectric/JUnit tests. (Closed)
Patch Set: Fix Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/config/android/rules.gni
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index ba8930f693bc7cfe469aecc4ccabc5382d458d2d..31d3673532c974e0ed7a34eca3c6701fa59d29c2 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -898,6 +898,7 @@ if (enable_java_templates) {
grit_target_name = "${target_name}__grit"
grit_output_dir = "$target_gen_dir/$extra_output_path"
+
grit(grit_target_name) {
forward_variables_from(invoker, [ "deps" ])
grit_flags = [
@@ -1058,11 +1059,27 @@ if (enable_java_templates) {
_java_binary_target_name = "${target_name}__java_binary"
_test_runner_target_name = "${target_name}__test_runner_script"
+ _build_config = "$target_gen_dir/$target_name.build_config"
+ _build_config_target_name = "${target_name}__build_config"
+
+ write_build_config(_build_config_target_name) {
+ type = "junit_binary"
+ build_config = _build_config
+ if (defined(invoker.deps)) {
+ possible_config_deps = invoker.deps
+ }
+ }
+
test_runner_script(_test_runner_target_name) {
test_name = invoker.target_name
test_suite = invoker.target_name
test_type = "junit"
ignore_all_data_deps = true
+ forward_variables_from(invoker,
+ [
+ "android_manifest_path",
+ "package_name",
+ ])
}
java_binary(_java_binary_target_name) {
@@ -1082,6 +1099,7 @@ if (enable_java_templates) {
}
group(target_name) {
public_deps = [
+ ":$_build_config_target_name",
":$_java_binary_target_name",
":$_test_runner_target_name",
]

Powered by Google App Engine
This is Rietveld 408576698