Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass resource bundles as data not deps #925

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions rules/library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ def apple_library(
)

# Generate resource bundles
module_data = library_tools["wrap_resources_in_filegroup"](
wrapped_resources_filegroup = library_tools["wrap_resources_in_filegroup"](
name = name + "_wrapped_resources_filegroup",
srcs = data,
testonly = testonly,
Expand All @@ -992,7 +992,7 @@ def apple_library(
resource_bundles = kwargs.pop("resource_bundles", {}),
platforms = platforms,
)
deps += resource_bundles
data = [wrapped_resources_filegroup] + resource_bundles

if has_swift_sources:
# Forward the kwargs and the swift specific kwargs to the swift_library
Expand All @@ -1018,7 +1018,7 @@ def apple_library(
"@build_bazel_rules_ios//:virtualize_frameworks": ["swift.vfsoverlay"],
"//conditions:default": [],
}),
data = [module_data],
data = data,
tags = tags_manual,
defines = defines + swift_defines,
testonly = testonly,
Expand Down Expand Up @@ -1112,7 +1112,7 @@ def apple_library(
weak_sdk_frameworks = weak_sdk_frameworks,
sdk_includes = sdk_includes,
pch = pch,
data = [] if has_swift_sources else [module_data],
data = [] if has_swift_sources else data,
tags = tags_manual,
defines = defines + objc_defines,
testonly = testonly,
Expand All @@ -1122,7 +1122,7 @@ def apple_library(
launch_screen_storyboard_name = name + "_launch_screen_storyboard"
native.filegroup(
name = launch_screen_storyboard_name,
srcs = [module_data],
srcs = data,
output_group = "launch_screen_storyboard",
tags = _MANUAL,
testonly = testonly,
Expand All @@ -1140,7 +1140,7 @@ def apple_library(
transitive_deps = deps,
deps = lib_names + deps,
module_name = module_name,
data = module_data,
data = data,
launch_screen_storyboard_name = launch_screen_storyboard_name,
namespace = namespace,
linkopts = copts_by_build_setting.linkopts + linkopts,
Expand Down