From 44146ddd5604779fb0bde05ca76f3e2f3ac7af99 Mon Sep 17 00:00:00 2001 From: Thiago Cruz Date: Thu, 27 Jul 2023 16:35:14 -0400 Subject: [PATCH] Pass datamodels to AppleResourceInfo in _precompiled_apple_resource_bundle --- rules/precompiled_apple_resource_bundle.bzl | 6 ++++++ rules/repositories.bzl | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rules/precompiled_apple_resource_bundle.bzl b/rules/precompiled_apple_resource_bundle.bzl index ae3e3420f..33219ada1 100644 --- a/rules/precompiled_apple_resource_bundle.bzl +++ b/rules/precompiled_apple_resource_bundle.bzl @@ -199,6 +199,12 @@ def _precompiled_apple_resource_bundle_impl(ctx): return [ AppleResourceInfo( unowned_resources = depset(), + datamodels = [ + (output_bundle_dir.basename, None, depset([f])) + for resource_files in ctx.attr.resources + for f in resource_files.files.to_list() + if f.path.count("xcdatamodel") + ], owners = depset([ (output_bundle_dir.short_path, ctx.label), (output_plist.short_path, ctx.label), diff --git a/rules/repositories.bzl b/rules/repositories.bzl index 01bc8203f..ce991385e 100644 --- a/rules/repositories.bzl +++ b/rules/repositories.bzl @@ -84,10 +84,10 @@ def rules_ios_dependencies( _maybe( github_repo, name = "build_bazel_rules_apple", - ref = "6f93e73382a01595d576247db9fa886769536605", + ref = "8210cec019da7dc8846c41bc643396559461e92d", project = "bazelbuild", repo = "rules_apple", - sha256 = "1618fc82e556ebc97ea360b8cacd3365ca3b0e0a85ccb32422468204843e752d", + sha256 = "de27679657f48ce9c264bc8bba30205a1a5705293e7f3aac3a34364e2b43da2f", ) else: _maybe(