Merge "Modify conditionals for BuildFromTextStub()" into main

This commit is contained in:
Treehugger Robot
2023-11-17 00:29:05 +00:00
committed by Gerrit Code Review
2 changed files with 9 additions and 1 deletions

View File

@@ -2075,11 +2075,17 @@ func (c *config) JavaCoverageEnabled() bool {
return c.IsEnvTrue("EMMA_INSTRUMENT") || c.IsEnvTrue("EMMA_INSTRUMENT_STATIC") || c.IsEnvTrue("EMMA_INSTRUMENT_FRAMEWORK")
}
func (c *deviceConfig) BuildFromSourceStub() bool {
return Bool(c.config.productVariables.BuildFromSourceStub)
}
func (c *config) BuildFromTextStub() bool {
// TODO: b/302320354 - Remove the coverage build specific logic once the
// robust solution for handling native properties in from-text stub build
// is implemented.
return !c.buildFromSourceStub && !c.JavaCoverageEnabled() && !c.IsEnvTrue("BUILD_FROM_SOURCE_STUB")
return !c.buildFromSourceStub &&
!c.JavaCoverageEnabled() &&
!c.deviceConfig.BuildFromSourceStub()
}
func (c *config) SetBuildFromTextStub(b bool) {

View File

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