From 7c13f9014ca08c8f3f6c7b45ec4a577514ff23e8 Mon Sep 17 00:00:00 2001 From: Alex Humesky Date: Mon, 26 Aug 2024 11:13:00 -0700 Subject: [PATCH] Automated rollback of commit 61a91b8e9a3f4045a41e6f5801f5557ba39a7f9e. PiperOrigin-RevId: 667647893 Change-Id: I04bfa2d4ed24c8be80858cb91cf04d3eac7d3358 --- rules/data_binding.bzl | 27 +++++++++------------------ rules/providers.bzl | 10 +--------- rules/reexport_providers.bzl | 1 + 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/rules/data_binding.bzl b/rules/data_binding.bzl index cd0a6c04e..bd2a0b1fc 100644 --- a/rules/data_binding.bzl +++ b/rules/data_binding.bzl @@ -224,11 +224,8 @@ def _process( if not enable_data_binding: db_info[_PROVIDERS] = [ DataBindingV2Info( - setter_stores = depset(transitive = [info.setter_stores for info in exports]), - class_infos = depset(transitive = [info.class_infos for info in exports]), - transitive_br_files = depset(transitive = - [info.transitive_br_files for info in deps] + - [info.transitive_br_files for info in exports]), + databinding_v2_providers_in_deps = deps, + databinding_v2_providers_in_exports = exports, ), ] return struct(**db_info) @@ -296,19 +293,13 @@ def _process( db_info[_PROVIDERS] = [ DataBindingV2Info( - setter_stores = depset( - direct = [setter_store_out] if setter_store_out else [], - transitive = [info.setter_stores for info in exports], - ), - class_infos = depset( - direct = [class_info] if class_info else [], - transitive = [info.class_infos for info in exports], - ), - transitive_br_files = depset( - direct = [br_out] if br_out else [], - transitive = [info.transitive_br_files for info in deps] + - [info.transitive_br_files for info in exports], - ), + setter_store_file = setter_store_out, + class_info_file = class_info, + br_file = br_out, + label = str(ctx.label), + java_package = java_package, + databinding_v2_providers_in_deps = deps, + databinding_v2_providers_in_exports = exports, ), ] diff --git a/rules/providers.bzl b/rules/providers.bzl index 64afbd4c7..9a90ffe95 100644 --- a/rules/providers.bzl +++ b/rules/providers.bzl @@ -280,15 +280,6 @@ ProguardMappingInfo = provider( ), ) -DataBindingV2Info = provider( - doc = "DataBindingV2Info", - fields = dict( - class_infos = "", - setter_stores = "", - transitive_br_files = "", - ), -) - # Native defined providers which will be gradually migrated to Starlark. # We re-export these here so that all our providers can be loaded from this file. AndroidResourcesInfo = providers.AndroidResourcesInfo @@ -296,4 +287,5 @@ AndroidSdkInfo = providers.AndroidSdkInfo AndroidManifestInfo = providers.AndroidManifestInfo AndroidAssetsInfo = providers.AndroidAssetsInfo AndroidIdeInfo = providers.AndroidIdeInfo +DataBindingV2Info = providers.DataBindingV2Info AndroidFeatureFlagSet = providers.AndroidFeatureFlagSet # buildifier: disable=name-conventions diff --git a/rules/reexport_providers.bzl b/rules/reexport_providers.bzl index 1526a1269..ac1948d12 100644 --- a/rules/reexport_providers.bzl +++ b/rules/reexport_providers.bzl @@ -26,5 +26,6 @@ providers = struct( AndroidManifestInfo = AndroidManifestInfo, AndroidAssetsInfo = AndroidAssetsInfo, AndroidIdeInfo = AndroidIdeInfo, + DataBindingV2Info = DataBindingV2Info, AndroidFeatureFlagSet = AndroidFeatureFlagSet, )