From 6c087cf01a69f20f791c1cd97272fab94d16bd0d Mon Sep 17 00:00:00 2001 From: Alix Date: Thu, 5 Jan 2023 21:12:31 +0000 Subject: libs support for android_app->* edge Test: bp2build tests Bug: 258688914 Change-Id: I2e24c484019c994b43509f350b3c090a40c3ba6a --- java/java.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index 5c4452396..e5bb106c8 100644 --- a/java/java.go +++ b/java/java.go @@ -2676,7 +2676,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" -- cgit v1.2.3