Merge changes I4e7a7ac5,I0c73361b into sc-dev

* changes:
  Record the actual APEXes that a module is part of.
  Rename InApexes -> InApexVariants
This commit is contained in:
Martin Stjernholm
2021-05-21 19:22:15 +00:00
committed by Android (Google) Code Review
10 changed files with 104 additions and 61 deletions

View File

@@ -895,12 +895,16 @@ func (a *apexBundle) ApexInfoMutator(mctx android.TopDownMutatorContext) {
// This is the main part of this mutator. Mark the collected dependencies that they need to
// be built for this apexBundle.
// Note that there are many different names.
// ApexVariationName: this is the name of the apex variation
apexInfo := android.ApexInfo{
ApexVariationName: mctx.ModuleName(),
ApexVariationName: mctx.ModuleName(), // could be com.android.foo
MinSdkVersion: minSdkVersion,
RequiredSdks: a.RequiredSdks(),
Updatable: a.Updatable(),
InApexes: []string{mctx.ModuleName()},
InApexVariants: []string{mctx.ModuleName()}, // could be com.android.foo
InApexModules: []string{a.Name()}, // could be com.mycompany.android.foo
ApexContents: []*android.ApexContents{apexContents},
}
mctx.WalkDeps(func(child, parent android.Module) bool {
@@ -1557,7 +1561,7 @@ func (a *apexBundle) WalkPayloadDeps(ctx android.ModuleContext, do android.Paylo
}
ai := ctx.OtherModuleProvider(child, android.ApexInfoProvider).(android.ApexInfo)
externalDep := !android.InList(ctx.ModuleName(), ai.InApexes)
externalDep := !android.InList(ctx.ModuleName(), ai.InApexVariants)
// Visit actually
return do(ctx, parent, am, externalDep)