Skip to content

Commit

Permalink
Switch the tvOS Apple BUILD rules and tests to the Starlark Apple spl…
Browse files Browse the repository at this point in the history
…it transition.

PiperOrigin-RevId: 549075405
  • Loading branch information
nglevin authored and swiple-rules-gardener committed Jul 18, 2023
1 parent b48a0ea commit f1daf41
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions apple/internal/testing/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ bzl_library(
"//apple/internal:providers",
"//apple/internal:rule_attrs",
"//apple/internal:rule_factory",
"//apple/internal:transition_support",
"//apple/internal/aspects:framework_provider_aspect",
"//apple/internal/aspects:resource_aspect",
],
Expand Down
2 changes: 1 addition & 1 deletion apple/internal/testing/build_test_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def apple_build_test_rule(doc, platform_type):
The created `rule`.
"""
targets_cfg = apple_common.multi_arch_split
if platform_type == "watchos":
if platform_type == "tvos" or platform_type == "watchos":
targets_cfg = transition_support.apple_platform_split_transition

# TODO(b/161808913): Once resource processing actions have all been moved
Expand Down
8 changes: 6 additions & 2 deletions apple/internal/testing/tvos_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ load(
"@build_bazel_rules_apple//apple/internal:rule_factory.bzl",
"rule_factory",
)
load(
"@build_bazel_rules_apple//apple/internal:transition_support.bzl",
"transition_support",
)
load(
"@build_bazel_rules_apple//apple/internal/aspects:framework_provider_aspect.bzl",
"framework_provider_aspect",
Expand Down Expand Up @@ -98,7 +102,7 @@ _tvos_internal_ui_test_bundle = rule_factory.create_apple_rule(
predeclared_outputs = {"archive": "%{name}.zip"},
attrs = [
rule_attrs.binary_linking_attrs(
deps_cfg = apple_common.multi_arch_split,
deps_cfg = transition_support.apple_platform_split_transition,
extra_deps_aspects = [
apple_resource_aspect,
framework_provider_aspect,
Expand Down Expand Up @@ -158,7 +162,7 @@ _tvos_internal_unit_test_bundle = rule_factory.create_apple_rule(
predeclared_outputs = {"archive": "%{name}.zip"},
attrs = [
rule_attrs.binary_linking_attrs(
deps_cfg = apple_common.multi_arch_split,
deps_cfg = transition_support.apple_platform_split_transition,
extra_deps_aspects = [
apple_resource_aspect,
framework_provider_aspect,
Expand Down
10 changes: 5 additions & 5 deletions apple/internal/tvos_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1020,10 +1020,10 @@ tvos_application = rule_factory.create_apple_rule(
attrs = [
rule_attrs.app_icon_attrs(),
rule_attrs.app_intents_attrs(
deps_cfg = apple_common.multi_arch_split,
deps_cfg = transition_support.apple_platform_split_transition,
),
rule_attrs.binary_linking_attrs(
deps_cfg = apple_common.multi_arch_split,
deps_cfg = transition_support.apple_platform_split_transition,
extra_deps_aspects = [
apple_resource_aspect,
framework_provider_aspect,
Expand All @@ -1032,7 +1032,7 @@ tvos_application = rule_factory.create_apple_rule(
requires_legacy_cc_toolchain = True,
),
rule_attrs.cc_toolchain_forwarder_attrs(
deps_cfg = apple_common.multi_arch_split,
deps_cfg = transition_support.apple_platform_split_transition,
),
rule_attrs.common_bundle_attrs(),
rule_attrs.common_tool_attrs(),
Expand Down Expand Up @@ -1081,7 +1081,7 @@ tvos_extension = rule_factory.create_apple_rule(
predeclared_outputs = {"archive": "%{name}.zip"},
attrs = [
rule_attrs.binary_linking_attrs(
deps_cfg = apple_common.multi_arch_split,
deps_cfg = transition_support.apple_platform_split_transition,
extra_deps_aspects = [
apple_resource_aspect,
framework_provider_aspect,
Expand Down Expand Up @@ -1122,7 +1122,7 @@ tvos_framework = rule_factory.create_apple_rule(
predeclared_outputs = {"archive": "%{name}.zip"},
attrs = [
rule_attrs.binary_linking_attrs(
deps_cfg = apple_common.multi_arch_split,
deps_cfg = transition_support.apple_platform_split_transition,
extra_deps_aspects = [
apple_resource_aspect,
framework_provider_aspect,
Expand Down

1 comment on commit f1daf41

@keith
Copy link
Member

@keith keith commented on f1daf41 Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.