Merge "Export non-apex variants of modules to make" am: bebe607db4 am: 09f4a08f55 am: 59a02182c0

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2486355

Change-Id: I2e614d603aea40bd1bacbda919e9ad1daf58f876
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Cole Faust
2023-03-17 19:04:28 +00:00
committed by Automerger Merge Worker
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() {