From 2eb797e05ba9f2416b6b3a8f7923c7b5d041bebc Mon Sep 17 00:00:00 2001 From: Thiago Cruz Date: Fri, 28 Jul 2023 14:02:30 -0400 Subject: [PATCH] Set xccurrentversions in datamodels instead --- rules/precompiled_apple_resource_bundle.bzl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/rules/precompiled_apple_resource_bundle.bzl b/rules/precompiled_apple_resource_bundle.bzl index 7533aa1cc..70f549138 100644 --- a/rules/precompiled_apple_resource_bundle.bzl +++ b/rules/precompiled_apple_resource_bundle.bzl @@ -196,15 +196,17 @@ def _precompiled_apple_resource_bundle_impl(ctx): outputs = [output_bundle_dir], ) + # See https://github.com/bazel-ios/rules_ios/pull/747 for context xccurrentversions = [ - f + (None, None, depset([f])) for resource_files in ctx.attr.resources for f in resource_files.files.to_list() - if f.path.count("xccurrentversion") + if f.extension == "xccurrentversion" ] return [ AppleResourceInfo( + datamodels = xccurrentversions, unowned_resources = depset(), owners = depset([ (output_bundle_dir.short_path, ctx.label), @@ -220,9 +222,6 @@ def _precompiled_apple_resource_bundle_impl(ctx): # Foo.bundle directory that contains our real resources unprocessed = [ (output_bundle_dir.basename, None, depset([output_bundle_dir, output_plist])), - # Handles an edge case when using `rules_xcodeproj` - # TODO: Link the PR here - (None, None, depset(xccurrentversions)), ], ), AppleResourceBundleInfo(),