Merge "Create a product variable for skipping apex contribution contents" into main am: 90db03c007

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2964564

Change-Id: Ide346f77130120b326b8e5342f719d3039e1dc5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Spandan Das 2024-02-15 08:57:24 +00:00 committed by Automerger Merge Worker
commit beb624f3b0
3 changed files with 10 additions and 0 deletions

View file

@ -98,6 +98,10 @@ func (a *allApexContributions) DepsMutator(ctx BottomUpMutatorContext) {
func (a *allApexContributions) SetPrebuiltSelectionInfoProvider(ctx BaseModuleContext) {
addContentsToProvider := func(p *PrebuiltSelectionInfoMap, m *apexContributions) {
for _, content := range m.Contents() {
// Skip any apexes that have been added to the product specific ignore list
if InList(content, ctx.Config().BuildIgnoreApexContributionContents()) {
continue
}
if !ctx.OtherModuleExists(content) && !ctx.Config().AllowMissingDependencies() {
ctx.ModuleErrorf("%s listed in apex_contributions %s does not exist\n", content, m.Name())
}

View file

@ -2047,3 +2047,7 @@ func (c *config) AllApexContributions() []string {
}
return ret
}
func (c *config) BuildIgnoreApexContributionContents() []string {
return c.productVariables.BuildIgnoreApexContributionContents
}

View file

@ -494,6 +494,8 @@ type ProductVariables struct {
BuildFlags map[string]string `json:",omitempty"`
BuildFromSourceStub *bool `json:",omitempty"`
BuildIgnoreApexContributionContents []string `json:",omitempty"`
}
type PartitionQualifiedVariablesType struct {