Index: build/config/android/rules.gni |
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni |
index 841b6e61b6d066f269d0e0a2f2d20ce8afa3b464..4cb5b4d6bce6cdba26e10600cd815ca603f9fd11 100644 |
--- a/build/config/android/rules.gni |
+++ b/build/config/android/rules.gni |
@@ -710,7 +710,6 @@ |
# is specified. |
# android_manifest: AndroidManifest.xml for this target. Defaults to |
# //build/android/AndroidManifest.xml. |
- # android_manifest_dep: Target that generates AndroidManifest (if applicable) |
# custom_package: java package for generated .java files. |
# v14_skip: If true, don't run v14 resource generator on this. Defaults to |
# false. (see build/android/gyp/generate_v14_compatible_resources.py) |
@@ -747,22 +746,13 @@ |
final_target_name = target_name |
write_build_config(build_config_target_name) { |
- type = "android_resources" |
forward_variables_from(invoker, |
[ |
"android_manifest", |
"custom_package", |
+ "deps", |
"resource_dirs", |
]) |
- |
- if (defined(invoker.deps)) { |
- possible_config_deps = invoker.deps |
- } |
- if (defined(invoker.android_manifest_dep)) { |
- deps = [ |
- invoker.android_manifest_dep, |
- ] |
- } |
# No package means resources override their deps. |
if (defined(custom_package) || defined(android_manifest)) { |
@@ -771,12 +761,15 @@ |
assert(defined(invoker.deps), |
"Must specify deps when custom_package is omitted.") |
} |
- |
+ visibility = [ ":$process_resources_target_name" ] |
+ |
+ type = "android_resources" |
resources_zip = zip_path |
srcjar = srcjar_path |
} |
process_resources(process_resources_target_name) { |
+ visibility = [ ":$final_target_name" ] |
forward_variables_from(invoker, |
[ |
"app_as_shared_lib", |
@@ -793,9 +786,6 @@ |
deps = [] |
} |
deps += [ ":$build_config_target_name" ] |
- if (defined(invoker.android_manifest_dep)) { |
- deps += [ invoker.android_manifest_dep ] |
- } |
# Always generate R.onResourcesLoaded() method, it is required for |
# compiling ResourceRewriter, there is no side effect because the |
@@ -859,15 +849,13 @@ |
_build_config_target_name = "${target_name}__build_config" |
write_build_config(_build_config_target_name) { |
+ forward_variables_from(invoker, |
+ [ |
+ "deps", |
+ "disable_compression", |
+ ]) |
type = "android_assets" |
build_config = _build_config |
- |
- forward_variables_from(invoker, [ "disable_compression" ]) |
- |
- if (defined(invoker.deps)) { |
- possible_config_deps = invoker.deps |
- } |
- |
if (defined(invoker.sources)) { |
asset_sources = invoker.sources |
} |
@@ -907,18 +895,13 @@ |
# } |
template("java_group") { |
write_build_config("${target_name}__build_config") { |
+ forward_variables_from(invoker, [ "deps" ]) |
type = "group" |
build_config = "$target_gen_dir/${invoker.target_name}.build_config" |
- |
- if (defined(invoker.deps)) { |
- possible_config_deps = invoker.deps |
- } |
} |
group(target_name) { |
+ deps = [] |
forward_variables_from(invoker, "*") |
- if (!defined(deps)) { |
- deps = [] |
- } |
deps += [ ":${target_name}__build_config" ] |
} |
} |
@@ -946,6 +929,7 @@ |
build_config = base_path + ".build_config" |
write_build_config("${target_name}__build_config") { |
+ forward_variables_from(invoker, [ "deps" ]) |
type = "android_resources" |
} |
@@ -955,7 +939,6 @@ |
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 = [ |
"-E", |
"ANDROID_JAVA_TAGGED_ONLY=false", |
@@ -1016,6 +999,7 @@ |
final_target_name = target_name |
write_build_config(build_config_target_name) { |
+ visibility = [ ":$zip_target_name" ] |
type = "android_resources" |
} |
@@ -1626,19 +1610,18 @@ |
android_manifest = _android_manifest |
deps = _android_manifest_deps |
- |
if (defined(invoker.deps)) { |
- possible_config_deps = invoker.deps |
+ deps += invoker.deps |
} |
if (defined(invoker.alternative_locale_resource_dep)) { |
- possible_config_deps += [ invoker.alternative_locale_resource_dep ] |
+ deps += [ invoker.alternative_locale_resource_dep ] |
has_alternative_locale_resource = true |
} |
# Added emma to the target's classpath via its .build_config. |
if (emma_coverage && !_emma_never_instrument) { |
- possible_config_deps += [ "//third_party/android_tools:emma_device" ] |
+ deps += [ "//third_party/android_tools:emma_device" ] |
} |
proguard_enabled = _proguard_enabled |