Allowlist apexer for bp2build
This also introduces a workaround for the fact that
apexer depends on aapt2, but aapt2 doesn't build
with bp2build yet. Aapt2 is removed from apexer's
requirements during bp2build.
Bug: 204244290
Test: ./build/bazel/ci/bp2build.sh
Change-Id: I837597ce035c7d5c06e1a3957166583a7a94b5c7
diff --git a/android/allowlists/allowlists.go b/android/allowlists/allowlists.go
index 672d7f6..a407b5e 100644
--- a/android/allowlists/allowlists.go
+++ b/android/allowlists/allowlists.go
@@ -329,6 +329,7 @@
//system/extras/ext4_utils
"libext4_utils",
+ "mke2fs_conf",
//system/extras/libfec
"libfec",
@@ -359,10 +360,10 @@
"gen-kotlin-build-file.py", // TODO(b/198619163) module has same name as source
"libgtest_ndk_c++", "libgtest_main_ndk_c++", // TODO(b/201816222): Requires sdk_version support.
"linkerconfig", "mdnsd", // TODO(b/202876379): has arch-variant static_executable
- "linker", // TODO(b/228316882): cc_binary uses link_crt
- "libdebuggerd", // TODO(b/228314770): support product variable-specific header_libs
- "versioner", // TODO(b/228313961): depends on prebuilt shared library libclang-cpp_host as a shared library, which does not supply expected providers for a shared library
- "apexer", "apexer_test", // Requires aapt2
+ "linker", // TODO(b/228316882): cc_binary uses link_crt
+ "libdebuggerd", // TODO(b/228314770): support product variable-specific header_libs
+ "versioner", // TODO(b/228313961): depends on prebuilt shared library libclang-cpp_host as a shared library, which does not supply expected providers for a shared library
+ "apexer_test", // Requires aapt2
"apexer_test_host_tools",
"host_apex_verifier",
diff --git a/android/module.go b/android/module.go
index ad01e9e..2925081 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1177,7 +1177,6 @@
data := &attrs.Data
- required := depsToLabelList(props.Required)
archVariantProps := mod.GetArchVariantProperties(ctx, &commonProperties{})
var enabledProperty bazel.BoolAttribute
@@ -1231,10 +1230,21 @@
}
}
+ required := depsToLabelList(props.Required)
for axis, configToProps := range archVariantProps {
for config, _props := range configToProps {
if archProps, ok := _props.(*commonProperties); ok {
- required.SetSelectValue(axis, config, depsToLabelList(archProps.Required).Value)
+ // TODO(b/234748998) Remove this requiredFiltered workaround when aapt2 converts successfully
+ requiredFiltered := archProps.Required
+ if name == "apexer" {
+ requiredFiltered = make([]string, 0, len(archProps.Required))
+ for _, req := range archProps.Required {
+ if req != "aapt2" && req != "apexer" {
+ requiredFiltered = append(requiredFiltered, req)
+ }
+ }
+ }
+ required.SetSelectValue(axis, config, depsToLabelList(requiredFiltered).Value)
if !neitherHostNorDevice {
if archProps.Enabled != nil {
if axis != bazel.OsConfigurationAxis || osSupport[config] {