Merge "Export non-apex variants of modules to make"

This commit is contained in:
Cole Faust
2023-03-17 17:20:19 +00:00
committed by Gerrit Code Review
9 changed files with 49 additions and 42 deletions

View File

@@ -76,9 +76,6 @@ func (library *Library) AndroidMkEntries() []android.AndroidMkEntries {
entriesList = append(entriesList, dexpreoptEntries...)
}
entriesList = append(entriesList, android.AndroidMkEntries{Disabled: true})
} else if !library.ApexModuleBase.AvailableFor(android.AvailableToPlatform) {
// Platform variant. If not available for the platform, we don't need Make module.
entriesList = append(entriesList, android.AndroidMkEntries{Disabled: true})
} else {
entriesList = append(entriesList, android.AndroidMkEntries{
Class: "JAVA_LIBRARIES",
@@ -94,7 +91,8 @@ func (library *Library) AndroidMkEntries() []android.AndroidMkEntries {
entries.AddStrings("LOCAL_LOGTAGS_FILES", logtags...)
}
if library.installFile == nil {
if library.installFile == nil || !library.ApexModuleBase.AvailableFor(android.AvailableToPlatform) {
// If the ApexModule is not available for the platform, it shouldn't be installed.
entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", true)
}
if library.dexJarFile.IsSet() {