Map prebuilt_apis labels to Bazel's manually generated ones.
Change-Id: I5bec807da9b39e2b166af1bd83da43df91f997ef
Bug: 237810289
Test: check that android-non-updatable.stubs.module_lib uses manual
bazel target for its sdk_system_current_android dependency
Change-Id: I6f5fb348e1dcaad10eb756382359f34de792b6e0
diff --git a/android/allowlists/allowlists.go b/android/allowlists/allowlists.go
index 6bd4e26..10c3aef 100644
--- a/android/allowlists/allowlists.go
+++ b/android/allowlists/allowlists.go
@@ -303,6 +303,7 @@
"prebuilts/clang/host/linux-x86": Bp2BuildDefaultTrueRecursively,
"prebuilts/gradle-plugin": Bp2BuildDefaultTrueRecursively,
"prebuilts/runtime/mainline/platform/sdk": Bp2BuildDefaultTrueRecursively,
+ "prebuilts/sdk": Bp2BuildDefaultTrue,
"prebuilts/sdk/current/androidx": Bp2BuildDefaultTrue,
"prebuilts/sdk/current/androidx-legacy": Bp2BuildDefaultTrue,
"prebuilts/sdk/current/extras/constraint-layout-x": Bp2BuildDefaultTrue,
diff --git a/android/bazel.go b/android/bazel.go
index 58d9d87..a9ba790 100644
--- a/android/bazel.go
+++ b/android/bazel.go
@@ -71,7 +71,7 @@
MissingDeps []string `blueprint:"mutated"`
}
-type bazelModuleProperties struct {
+type BazelModuleProperties struct {
// The label of the Bazel target replacing this Soong module. When run in conversion mode, this
// will import the handcrafted build target into the autogenerated file. Note: this may result in
// a conflict due to duplicate targets if bp2build_available is also set.
@@ -96,7 +96,7 @@
type properties struct {
// In "Bazel mixed build" mode, this represents the Bazel target replacing
// this Soong module.
- Bazel_module bazelModuleProperties
+ Bazel_module BazelModuleProperties
}
// namespacedVariableProperties is a map from a string representing a Soong
diff --git a/android/bazel_test.go b/android/bazel_test.go
index 87b2c8f..77e2515 100644
--- a/android/bazel_test.go
+++ b/android/bazel_test.go
@@ -218,7 +218,7 @@
var bazelableBazelModuleBase = BazelModuleBase{
bazelProperties: properties{
- Bazel_module: bazelModuleProperties{
+ Bazel_module: BazelModuleProperties{
CanConvertToBazel: true,
},
},
@@ -344,7 +344,7 @@
},
BazelModuleBase: BazelModuleBase{
bazelProperties: properties{
- Bazel_module: bazelModuleProperties{
+ Bazel_module: BazelModuleProperties{
CanConvertToBazel: true,
Bp2build_available: proptools.BoolPtr(true),
},