Loading android/apex_contributions.go +13 −11 Original line number Original line Diff line number Diff line Loading @@ -115,10 +115,6 @@ 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 } // Coverage builds for TARGET_RELEASE=foo should always build from source, // Coverage builds for TARGET_RELEASE=foo should always build from source, // even if TARGET_RELEASE=foo uses prebuilt mainline modules. // even if TARGET_RELEASE=foo uses prebuilt mainline modules. // This is necessary because the checked-in prebuilts were generated with // This is necessary because the checked-in prebuilts were generated with Loading @@ -141,6 +137,11 @@ func (a *allApexContributions) SetPrebuiltSelectionInfoProvider(ctx BaseModuleCo } } p := PrebuiltSelectionInfoMap{} p := PrebuiltSelectionInfoMap{} // Skip apex_contributions if BuildApexContributionContents is true // This product config var allows some products in the same family to use mainline modules from source // (e.g. shiba and shiba_fullmte) // Eventually these product variants will have their own release config maps. if !proptools.Bool(ctx.Config().BuildIgnoreApexContributionContents()) { ctx.VisitDirectDepsWithTag(acDepTag, func(child Module) { ctx.VisitDirectDepsWithTag(acDepTag, func(child Module) { if m, ok := child.(*apexContributions); ok { if m, ok := child.(*apexContributions); ok { addContentsToProvider(&p, m) addContentsToProvider(&p, m) Loading @@ -148,6 +149,7 @@ func (a *allApexContributions) SetPrebuiltSelectionInfoProvider(ctx BaseModuleCo ctx.ModuleErrorf("%s is not an apex_contributions module\n", child.Name()) ctx.ModuleErrorf("%s is not an apex_contributions module\n", child.Name()) } } }) }) } SetProvider(ctx, PrebuiltSelectionInfoProvider, p) SetProvider(ctx, PrebuiltSelectionInfoProvider, p) } } Loading android/config.go +1 −1 Original line number Original line Diff line number Diff line Loading @@ -2122,7 +2122,7 @@ func (c *config) AllApexContributions() []string { return ret return ret } } func (c *config) BuildIgnoreApexContributionContents() []string { func (c *config) BuildIgnoreApexContributionContents() *bool { return c.productVariables.BuildIgnoreApexContributionContents return c.productVariables.BuildIgnoreApexContributionContents } } Loading android/variable.go +1 −1 Original line number Original line Diff line number Diff line Loading @@ -499,7 +499,7 @@ type ProductVariables struct { BuildFromSourceStub *bool `json:",omitempty"` BuildFromSourceStub *bool `json:",omitempty"` BuildIgnoreApexContributionContents []string `json:",omitempty"` BuildIgnoreApexContributionContents *bool `json:",omitempty"` HiddenapiExportableStubs *bool `json:",omitempty"` HiddenapiExportableStubs *bool `json:",omitempty"` Loading Loading
android/apex_contributions.go +13 −11 Original line number Original line Diff line number Diff line Loading @@ -115,10 +115,6 @@ 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 } // Coverage builds for TARGET_RELEASE=foo should always build from source, // Coverage builds for TARGET_RELEASE=foo should always build from source, // even if TARGET_RELEASE=foo uses prebuilt mainline modules. // even if TARGET_RELEASE=foo uses prebuilt mainline modules. // This is necessary because the checked-in prebuilts were generated with // This is necessary because the checked-in prebuilts were generated with Loading @@ -141,6 +137,11 @@ func (a *allApexContributions) SetPrebuiltSelectionInfoProvider(ctx BaseModuleCo } } p := PrebuiltSelectionInfoMap{} p := PrebuiltSelectionInfoMap{} // Skip apex_contributions if BuildApexContributionContents is true // This product config var allows some products in the same family to use mainline modules from source // (e.g. shiba and shiba_fullmte) // Eventually these product variants will have their own release config maps. if !proptools.Bool(ctx.Config().BuildIgnoreApexContributionContents()) { ctx.VisitDirectDepsWithTag(acDepTag, func(child Module) { ctx.VisitDirectDepsWithTag(acDepTag, func(child Module) { if m, ok := child.(*apexContributions); ok { if m, ok := child.(*apexContributions); ok { addContentsToProvider(&p, m) addContentsToProvider(&p, m) Loading @@ -148,6 +149,7 @@ func (a *allApexContributions) SetPrebuiltSelectionInfoProvider(ctx BaseModuleCo ctx.ModuleErrorf("%s is not an apex_contributions module\n", child.Name()) ctx.ModuleErrorf("%s is not an apex_contributions module\n", child.Name()) } } }) }) } SetProvider(ctx, PrebuiltSelectionInfoProvider, p) SetProvider(ctx, PrebuiltSelectionInfoProvider, p) } } Loading
android/config.go +1 −1 Original line number Original line Diff line number Diff line Loading @@ -2122,7 +2122,7 @@ func (c *config) AllApexContributions() []string { return ret return ret } } func (c *config) BuildIgnoreApexContributionContents() []string { func (c *config) BuildIgnoreApexContributionContents() *bool { return c.productVariables.BuildIgnoreApexContributionContents return c.productVariables.BuildIgnoreApexContributionContents } } Loading
android/variable.go +1 −1 Original line number Original line Diff line number Diff line Loading @@ -499,7 +499,7 @@ type ProductVariables struct { BuildFromSourceStub *bool `json:",omitempty"` BuildFromSourceStub *bool `json:",omitempty"` BuildIgnoreApexContributionContents []string `json:",omitempty"` BuildIgnoreApexContributionContents *bool `json:",omitempty"` HiddenapiExportableStubs *bool `json:",omitempty"` HiddenapiExportableStubs *bool `json:",omitempty"` Loading