Merge "Don't add flattened files apex as dependencies of an image apex"
diff --git a/cc/library.go b/cc/library.go
index 8fd0019..1291f5c 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -1239,6 +1239,10 @@
// b/239274367 --apex and --systemapi filters symbols tagged with # apex and #
// systemapi, respectively. The former is for symbols defined in platform libraries
// and the latter is for symbols defined in APEXes.
+ // A single library can contain either # apex or # systemapi, but not both.
+ // The stub generator (ndkstubgen) is additive, so passing _both_ of these to it should be a no-op.
+ // However, having this distinction helps guard accidental
+ // promotion or demotion of API and also helps the API review process b/191371676
var flag string
if ctx.Module().(android.ApexModule).NotInPlatform() {
flag = "--apex"
diff --git a/java/java.go b/java/java.go
index 37fc390..0479f10 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2675,17 +2675,10 @@
}
if m.properties.Libs != nil {
- // TODO 244210934 ALIX Check if this else statement breaks presubmits get rid of it if it doesn't
- modType := ctx.ModuleType()
- if strings.HasPrefix(modType, "java_binary") || strings.HasPrefix(modType, "java_library") || modType == "android_app" || modType == "android_library" || modType == "java_plugin" {
- for _, d := range m.properties.Libs {
- neverlinkLabel := android.BazelLabelForModuleDepSingle(ctx, d)
- neverlinkLabel.Label = neverlinkLabel.Label + "-neverlink"
- deps.Add(&neverlinkLabel)
- }
-
- } else {
- deps.Append(android.BazelLabelForModuleDeps(ctx, android.LastUniqueStrings(android.CopyOf(m.properties.Libs))))
+ for _, d := range m.properties.Libs {
+ neverlinkLabel := android.BazelLabelForModuleDepSingle(ctx, d)
+ neverlinkLabel.Label = neverlinkLabel.Label + "-neverlink"
+ deps.Add(&neverlinkLabel)
}
}