@@ -1180,6 +1180,7 @@ def _process_starlark(
11801180 neverlink = False ,
11811181 enable_data_binding = False ,
11821182 propagate_resources = True ,
1183+ propagate_transitive_resources_class_jars = True ,
11831184 fix_resource_transitivity = False ,
11841185 aapt = None ,
11851186 android_jar = None ,
@@ -1230,6 +1231,9 @@ def _process_starlark(
12301231 propagate_resources: boolean. If false, the target will no longer propagate
12311232 providers required for Android Resource processing/packaging. But will
12321233 continue to propagate others (AndroidLibraryResourceClassJarProvider).
1234+ propagate_transitive_resources_class_jars: boolean. If false, the target will no longer propagate
1235+ the transitive Android Resource class jars as part of the AndroidLibraryResourceClassJarProvider
1236+ provider and will only propagate the direct Android Resource class jar.
12331237 fix_resource_transitivity: Whether to ensure that transitive resources are
12341238 correctly marked as transitive.
12351239 aapt: FilesToRunProvider. The aapt executable or FilesToRunProvider.
@@ -1789,15 +1793,14 @@ def _process_starlark(
17891793 deps ,
17901794 exports ,
17911795 )
1792- ],
1796+ ] if propagate_transitive_resources_class_jars else [] ,
17931797 order = "preorder" ,
17941798 ),
17951799 ),
17961800 )
17971801
17981802 return resources_ctx
17991803
1800-
18011804def _process (
18021805 ctx ,
18031806 manifest = None ,
@@ -1828,6 +1831,7 @@ def _process(
18281831 fix_resource_transitivity = False ,
18291832 fix_export_exporting = False ,
18301833 propagate_resources = True ,
1834+ propagate_transitive_resources_class_jars = True ,
18311835 zip_tool = None ):
18321836 out_ctx = _process_starlark (
18331837 ctx ,
@@ -1851,6 +1855,7 @@ def _process(
18511855 fix_resource_transitivity = fix_resource_transitivity ,
18521856 neverlink = neverlink ,
18531857 propagate_resources = propagate_resources ,
1858+ propagate_transitive_resources_class_jars = propagate_transitive_resources_class_jars ,
18541859 android_jar = android_jar ,
18551860 aapt = aapt ,
18561861 android_kit = android_kit ,
@@ -1862,7 +1867,6 @@ def _process(
18621867 zip_tool = zip_tool ,
18631868 )
18641869
1865-
18661870 if _VALIDATION_OUTPUTS not in out_ctx :
18671871 out_ctx [_VALIDATION_OUTPUTS ] = []
18681872
0 commit comments