@@ -495,6 +495,7 @@ def _package(
495495 should_compile_java_srcs = True ,
496496 generate_minsdk_proguard_config = False ,
497497 build_java_with_final_resources = False ,
498+ feature_flags = "" ,
498499 aapt = None ,
499500 has_local_proguard_specs = False ,
500501 android_jar = None ,
@@ -764,6 +765,7 @@ def _package(
764765 shrink_resource_cycles = shrink_resource_cycles ,
765766 version_name = manifest_values [_VERSION_NAME ] if _VERSION_NAME in manifest_values else None ,
766767 version_code = manifest_values [_VERSION_CODE ] if _VERSION_CODE in manifest_values else None ,
768+ feature_flags = feature_flags ,
767769 android_jar = android_jar ,
768770 aapt = aapt ,
769771 busybox = busybox ,
@@ -1188,6 +1190,7 @@ def _process_starlark(
11881190 deps = [],
11891191 resource_apks = [],
11901192 exports = [],
1193+ feature_flags = "" ,
11911194 resource_files = None ,
11921195 neverlink = False ,
11931196 enable_data_binding = False ,
@@ -1228,6 +1231,7 @@ def _process_starlark(
12281231 attributes are considered direct dependencies of any rule that directly
12291232 depends on the target with exports. The exports are not direct deps of
12301233 the rule they belong to (TODO(b/144134042): make this so).
1234+ feature_flags: string. The string value for --feature-flags to pass to aapt2.
12311235 resource_files: sequence of Files. A list of Android resource files to be
12321236 processed.
12331237 neverlink: boolean. Only use this library for compilation and not runtime.
@@ -1406,6 +1410,7 @@ def _process_starlark(
14061410 transitive_compiled_resources = transitive_compiled_resources ,
14071411 transitive_manifests = transitive_manifests ,
14081412 transitive_r_txts = transitive_r_txts ,
1413+ feature_flags = feature_flags ,
14091414 package_type = "LIBRARY" ,
14101415 java_package = java_package ,
14111416 android_jar = android_jar ,
@@ -1582,6 +1587,7 @@ def _process_starlark(
15821587 ),
15831588 java_package = java_package ,
15841589 manifest = processed_manifest ,
1590+ feature_flags = feature_flags ,
15851591 android_jar = android_jar ,
15861592 aapt = aapt ,
15871593 busybox = busybox ,
@@ -1795,6 +1801,7 @@ def _process(
17951801 deps = [],
17961802 resource_apks = [],
17971803 exports = [],
1804+ feature_flags = "" ,
17981805 android_jar = None ,
17991806 android_kit = None ,
18001807 aapt = None ,
@@ -1821,6 +1828,7 @@ def _process(
18211828 deps = deps ,
18221829 resource_apks = resource_apks ,
18231830 exports = exports ,
1831+ feature_flags = feature_flags ,
18241832 resource_files = resource_files ,
18251833 enable_data_binding = enable_data_binding ,
18261834 fix_resource_transitivity = fix_resource_transitivity ,
0 commit comments