Fix androidmk module ordering
Java binary modules expect the order of modules in Soong's Android.mk to match the variant order. Instead of sorting by name and then subdir, which will alphabetize the variants, only sort by name and use sort.Stable to keep the ordering of modules with the same name. Test: m Change-Id: Icf3d22bdc9f9c73945d01c2c47468cc1c361035d
This commit is contained in:
@@ -72,7 +72,9 @@ func (c *androidMkSingleton) GenerateBuildActions(ctx SingletonContext) {
|
||||
androidMkModulesList = append(androidMkModulesList, module)
|
||||
})
|
||||
|
||||
sort.Sort(ModulesByName{androidMkModulesList, ctx})
|
||||
sort.SliceStable(androidMkModulesList, func(i, j int) bool {
|
||||
return ctx.ModuleName(androidMkModulesList[i]) < ctx.ModuleName(androidMkModulesList[j])
|
||||
})
|
||||
|
||||
transMk := PathForOutput(ctx, "Android"+String(ctx.Config().productVariables.Make_suffix)+".mk")
|
||||
if ctx.Failed() {
|
||||
|
Reference in New Issue
Block a user