Skip to content

Commit

Permalink
Pass resource bundles as data not deps
Browse files Browse the repository at this point in the history
  • Loading branch information
luispadron committed Sep 24, 2024
1 parent 9e72bb6 commit 93b48af
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 93b48af

Please sign in to comment.