Revert "Revert "Create a product variable for skipping apex cont..."

Revert submission 2966055-revert-2964509-skip-apex-contributions-EOKWOFHENC

Reason for revert: The root cause CL has been reverted https://googleplex-android-review.git.corp.google.com/c/platform/vendor/google/build/+/26268799

Reverted changes: /q/submissionid:2966055-revert-2964509-skip-apex-contributions-EOKWOFHENC

Change-Id: I93e8f60124a09b4fba4675ac7f128ab553102bf7
This commit is contained in:
Spandan Das 2024-02-17 03:31:45 +00:00 committed by Gerrit Code Review
parent 3801a965d5
commit 8ab28dd61d
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) { func (a *allApexContributions) SetPrebuiltSelectionInfoProvider(ctx BaseModuleContext) {
addContentsToProvider := func(p *PrebuiltSelectionInfoMap, m *apexContributions) { addContentsToProvider := func(p *PrebuiltSelectionInfoMap, m *apexContributions) {
for _, content := range m.Contents() { 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() { if !ctx.OtherModuleExists(content) && !ctx.Config().AllowMissingDependencies() {
ctx.ModuleErrorf("%s listed in apex_contributions %s does not exist\n", content, m.Name()) ctx.ModuleErrorf("%s listed in apex_contributions %s does not exist\n", content, m.Name())
} }

View file

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

View file

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