Commit f59cc364 authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Cast Extensions] Update dependencies to use non-generated target names

Update some cast dependencies to use the target name from the BUILD.gn
file, rather than the generated target name. This is clearer, since
these targets are specified within the BUILD.gn file at the location,
and also removes one duplicate target dependency.

Also prevent targets from depending on the generated target names by
restricting their visibility to the output static library.

Bug: None
Change-Id: Ib87f2d90edab44e52569e29b6c1675238df6efdc
Reviewed-on: https://chromium-review.googlesource.com/1150935Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578478}
parent 0ca186bb
...@@ -305,8 +305,8 @@ cast_source_set("browser") { ...@@ -305,8 +305,8 @@ cast_source_set("browser") {
} }
deps += [ deps += [
"//chromecast/common/extensions_api:api_registration_bundle_generator_registration", "//chromecast/common/extensions_api:api",
"//chromecast/common/extensions_api:api_schema_generator", "//chromecast/common/extensions_api:api_registration",
"//components/guest_view/browser", "//components/guest_view/browser",
"//components/keyed_service/content", "//components/keyed_service/content",
"//components/pref_registry", "//components/pref_registry",
......
...@@ -43,12 +43,11 @@ cast_source_set("common") { ...@@ -43,12 +43,11 @@ cast_source_set("common") {
deps += [ deps += [
"//chromecast/common/extensions_api:api", "//chromecast/common/extensions_api:api",
"//chromecast/common/extensions_api:api_registration", "//chromecast/common/extensions_api:api_registration",
"//chromecast/common/extensions_api:api_schema_generator",
"//chromecast/common/extensions_api:extensions_features", "//chromecast/common/extensions_api:extensions_features",
"//components/version_info", "//components/version_info",
"//extensions:extensions_resources_grd_grit", "//extensions:extensions_resources_grd_grit",
"//extensions/common", "//extensions/common",
"//extensions/common/api:generated_api_bundle_generator_schema", "//extensions/common/api:generated_api",
"//extensions/shell:resources", "//extensions/shell:resources",
"//extensions/shell:resources_grit", "//extensions/shell:resources_grit",
] ]
......
...@@ -102,9 +102,15 @@ template("json_schema_api") { ...@@ -102,9 +102,15 @@ template("json_schema_api") {
root_namespace = invoker.root_namespace root_namespace = invoker.root_namespace
# Save the target_name, since other targets (like the action() and
# action_foreach() below) need to reference them, but would have their own
# target_name variable.
root_target_name = target_name
if (schemas) { if (schemas) {
schema_generator_name = target_name + "_schema_generator" schema_generator_name = target_name + "_schema_generator"
action_foreach(schema_generator_name) { action_foreach(schema_generator_name) {
visibility = [":$root_target_name"]
script = compiler_script script = compiler_script
sources = invoker.sources sources = invoker.sources
inputs = compiler_sources inputs = compiler_sources
...@@ -140,6 +146,7 @@ template("json_schema_api") { ...@@ -140,6 +146,7 @@ template("json_schema_api") {
bundle_generator_schema_name = target_name + "_bundle_generator_schema" bundle_generator_schema_name = target_name + "_bundle_generator_schema"
action(bundle_generator_schema_name) { action(bundle_generator_schema_name) {
visibility = [":$root_target_name"]
script = compiler_script script = compiler_script
inputs = compiler_sources + invoker.sources + uncompiled_sources + inputs = compiler_sources + invoker.sources + uncompiled_sources +
uncompiled_bundle_schema_sources uncompiled_bundle_schema_sources
...@@ -178,6 +185,7 @@ template("json_schema_api") { ...@@ -178,6 +185,7 @@ template("json_schema_api") {
bundle_generator_registration_name = bundle_generator_registration_name =
target_name + "_bundle_generator_registration" target_name + "_bundle_generator_registration"
action(bundle_generator_registration_name) { action(bundle_generator_registration_name) {
visibility = [":$root_target_name"]
script = compiler_script script = compiler_script
inputs = compiler_sources + invoker.sources + uncompiled_sources inputs = compiler_sources + invoker.sources + uncompiled_sources
outputs = [ outputs = [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment