Merge changes I4e7a7ac5,I0c73361b

* changes:
  Record the actual APEXes that a module is part of.
  Rename InApexes -> InApexVariants
This commit is contained in:
Jiyong Park
2021-05-20 09:59:59 +00:00
committed by Gerrit Code Review
10 changed files with 104 additions and 61 deletions

View File

@@ -906,12 +906,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 {
@@ -1604,7 +1608,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)

View File

@@ -230,7 +230,8 @@ func (p *prebuiltCommon) apexInfoMutator(mctx android.TopDownMutatorContext) {
// Create an ApexInfo for the prebuilt_apex.
apexInfo := android.ApexInfo{
ApexVariationName: android.RemoveOptionalPrebuiltPrefix(mctx.ModuleName()),
InApexes: []string{mctx.ModuleName()},
InApexVariants: []string{mctx.ModuleName()},
InApexModules: []string{mctx.ModuleName()},
ApexContents: []*android.ApexContents{apexContents},
ForPrebuiltApex: true,
}