Merge "Revert^2 "Remove compilation actions from java sdk library"" into main

This commit is contained in:
Treehugger Robot
2024-05-08 22:28:05 +00:00
committed by Gerrit Code Review
17 changed files with 177 additions and 79 deletions

View File

@@ -1677,7 +1677,13 @@ func apexFileForJavaModuleWithFile(ctx android.BaseModuleContext, module javaMod
af.jacocoReportClassesFile = module.JacocoReportClassesFile()
af.lintDepSets = module.LintDepSets()
af.customStem = module.Stem() + ".jar"
if dexpreopter, ok := module.(java.DexpreopterInterface); ok {
// TODO: b/338641779 - Remove special casing of sdkLibrary once bcpf and sscpf depends
// on the implementation library
if sdkLib, ok := module.(*java.SdkLibrary); ok {
for _, install := range sdkLib.BuiltInstalledForApex() {
af.requiredModuleNames = append(af.requiredModuleNames, install.FullModuleName())
}
} else if dexpreopter, ok := module.(java.DexpreopterInterface); ok {
for _, install := range dexpreopter.DexpreoptBuiltInstalledForApex() {
af.requiredModuleNames = append(af.requiredModuleNames, install.FullModuleName())
}