Merge "Remove fallback to classes jars from bootclasspath_fragment"
This commit is contained in:
@@ -58,30 +58,20 @@ func newMonolithicHiddenAPIInfo(ctx android.ModuleContext, flagFilesByCategory F
|
|||||||
// Merge all the information from the classpathElements. The fragments form a DAG so it is possible that
|
// Merge all the information from the classpathElements. The fragments form a DAG so it is possible that
|
||||||
// this will introduce duplicates so they will be resolved after processing all the classpathElements.
|
// this will introduce duplicates so they will be resolved after processing all the classpathElements.
|
||||||
for _, element := range classpathElements {
|
for _, element := range classpathElements {
|
||||||
var classesJars android.Paths
|
|
||||||
switch e := element.(type) {
|
switch e := element.(type) {
|
||||||
case *ClasspathLibraryElement:
|
case *ClasspathLibraryElement:
|
||||||
classesJars = retrieveClassesJarsFromModule(e.Module())
|
classesJars := retrieveClassesJarsFromModule(e.Module())
|
||||||
|
monolithicInfo.ClassesJars = append(monolithicInfo.ClassesJars, classesJars...)
|
||||||
|
|
||||||
case *ClasspathFragmentElement:
|
case *ClasspathFragmentElement:
|
||||||
fragment := e.Module()
|
fragment := e.Module()
|
||||||
if ctx.OtherModuleHasProvider(fragment, HiddenAPIInfoProvider) {
|
if ctx.OtherModuleHasProvider(fragment, HiddenAPIInfoProvider) {
|
||||||
info := ctx.OtherModuleProvider(fragment, HiddenAPIInfoProvider).(HiddenAPIInfo)
|
info := ctx.OtherModuleProvider(fragment, HiddenAPIInfoProvider).(HiddenAPIInfo)
|
||||||
monolithicInfo.append(&info)
|
monolithicInfo.append(&info)
|
||||||
|
} else {
|
||||||
// If the bootclasspath fragment actually perform hidden API processing itself then use the
|
ctx.ModuleErrorf("%s does not provide hidden API information", fragment)
|
||||||
// CSV files it provides and do not bother processing the classesJars files. This ensures
|
|
||||||
// consistent behavior between source and prebuilt as prebuilt modules do not provide
|
|
||||||
// classesJars.
|
|
||||||
if info.AllFlagsPath != nil {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
classesJars = extractClassesJarsFromModules(e.Contents)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
monolithicInfo.ClassesJars = append(monolithicInfo.ClassesJars, classesJars...)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dedup paths.
|
// Dedup paths.
|
||||||
|
Reference in New Issue
Block a user