Depend on stubs via @api_surfaces

BUILD files of rdeps should depend on stubs via @api_surfaces
indirection. e.g. instead of depending on
//system/logging/liblog:liblog_stub_libs_current, it should depend on
@api_surfaces//module-libapi/current:liblog. This ensures that the
generated BUILD files are compatible with Multi-tree.

Update the unit tests for this change.

Test: TH
Change-Id: Ibcc36dcfbee7b1973b341485f015e67987564dcc
This commit is contained in:
Spandan Das
2023-03-17 03:02:32 +00:00
parent 44ac6dad27
commit 2518c022d1
4 changed files with 21 additions and 13 deletions

View File

@@ -1553,7 +1553,7 @@ cc_library_static {
}),
MakeBazelTarget("cc_library_static", "keep_with_stubs", AttrNameToString{
"implementation_dynamic_deps": `select({
"//build/bazel/rules/apex:android-in_apex": [":libm_stub_libs_current"],
"//build/bazel/rules/apex:android-in_apex": ["@api_surfaces//module-libapi/current:libm"],
"//conditions:default": [":libm"],
})`,
"system_dynamic_deps": `[]`,