Merge "libs support for android_app->* edge"

This commit is contained in:
Alix Espino
2023-01-17 14:31:18 +00:00
committed by Gerrit Code Review
2 changed files with 30 additions and 1 deletions

View File

@@ -2677,7 +2677,9 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
if m.properties.Libs != nil {
// TODO 244210934 ALIX Check if this else statement breaks presubmits get rid of it if it doesn't
if strings.HasPrefix(ctx.ModuleType(), "java_binary") || strings.HasPrefix(ctx.ModuleType(), "java_library") || ctx.ModuleType() == "android_library" {
modType := ctx.ModuleType()
if strings.HasPrefix(modType, "java_binary") || strings.HasPrefix(modType, "java_library") || modType == "android_app" || modType == "android_library" {
for _, d := range m.properties.Libs {
neverlinkLabel := android.BazelLabelForModuleDepSingle(ctx, d)
neverlinkLabel.Label = neverlinkLabel.Label + "-neverlink"