Stub/Impl selection for sdk variants

If a dependency has ndk stubs, then the sdk variant of the library
should link against the ndk stub variant and not the impl/apex_stubs variant

Unlike module-libapi, the depdendency does not go through an
@api_surfaces external repo indirection. This indirection was created to
support Multi-tree, and will likely  be removed in the future

Test: Added a unit test
Bug: 298085502
Change-Id: Ie081e153fa586b6c22db0b8e42f91149fd8e5d9b
This commit is contained in:
Spandan Das
2023-09-15 01:08:23 +00:00
parent 63acae9af1
commit 1f65f9e9bd
3 changed files with 89 additions and 0 deletions

View File

@@ -71,6 +71,7 @@ const (
AndroidAndInApex = "android-in_apex"
AndroidPlatform = "system"
Unbundled_app = "unbundled_app"
InApex = "in_apex"
NonApex = "non_apex"
@@ -207,6 +208,7 @@ var (
osAndInApexMap = map[string]string{
AndroidAndInApex: "//build/bazel/rules/apex:android-in_apex",
AndroidPlatform: "//build/bazel/rules/apex:system",
Unbundled_app: "//build/bazel/rules/apex:unbundled_app",
OsDarwin: "//build/bazel/platforms/os:darwin",
OsLinux: "//build/bazel/platforms/os:linux_glibc",
osLinuxMusl: "//build/bazel/platforms/os:linux_musl",