Merge "Use both module name and stem name to filter updatable boot jars" am: 276fd424ad
am: 31620af91d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1748051 Change-Id: Ib0f336f1ee599d2cb8ed03af3caec2fb953a4878
This commit is contained in:
@@ -106,21 +106,12 @@ func (s *SystemServerClasspathModule) GenerateAndroidBuildActions(ctx android.Mo
|
||||
func (s *SystemServerClasspathModule) configuredJars(ctx android.ModuleContext) android.ConfiguredJarList {
|
||||
global := dexpreopt.GetGlobalConfig(ctx)
|
||||
|
||||
// Convert content names to their appropriate stems, in case a test library is overriding an actual boot jar
|
||||
var stems []string
|
||||
for _, name := range s.properties.Contents {
|
||||
dep := ctx.GetDirectDepWithTag(name, systemServerClasspathFragmentContentDepTag)
|
||||
if m, ok := dep.(ModuleWithStem); ok {
|
||||
stems = append(stems, m.Stem())
|
||||
} else {
|
||||
ctx.PropertyErrorf("contents", "%v is not a ModuleWithStem", name)
|
||||
}
|
||||
}
|
||||
possibleUpdatableModules := gatherPossibleUpdatableModuleNamesAndStems(ctx, s.properties.Contents, systemServerClasspathFragmentContentDepTag)
|
||||
|
||||
// Only create configs for updatable boot jars. Non-updatable system server jars must be part of the
|
||||
// platform_systemserverclasspath's classpath proto config to guarantee that they come before any
|
||||
// updatable jars at runtime.
|
||||
return global.UpdatableSystemServerJars.Filter(stems)
|
||||
return global.UpdatableSystemServerJars.Filter(possibleUpdatableModules)
|
||||
}
|
||||
|
||||
type systemServerClasspathFragmentContentDependencyTag struct {
|
||||
|
Reference in New Issue
Block a user