Merge "add jacocoagent by default to Java modules" into tm-mainline-prod
This commit is contained in:
committed by
Android (Google) Code Review
commit
3fd5d95c61
11
java/base.go
11
java/base.go
@@ -649,6 +649,10 @@ func (j *Module) shouldInstrumentInApex(ctx android.BaseModuleContext) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (j *Module) setInstrument(value bool) {
|
||||
j.properties.Instrument = value
|
||||
}
|
||||
|
||||
func (j *Module) SdkVersion(ctx android.EarlyModuleContext) android.SdkSpec {
|
||||
return android.SdkSpecFrom(ctx, String(j.deviceProperties.Sdk_version))
|
||||
}
|
||||
@@ -783,9 +787,6 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
|
||||
} else if j.shouldInstrumentStatic(ctx) {
|
||||
ctx.AddVariationDependencies(nil, staticLibTag, "jacocoagent")
|
||||
}
|
||||
if j.shouldInstrument(ctx) {
|
||||
ctx.AddVariationDependencies(nil, libTag, "jacocoagent")
|
||||
}
|
||||
|
||||
if j.useCompose() {
|
||||
ctx.AddVariationDependencies(ctx.Config().BuildOSCommonTarget.Variations(), kotlinPluginTag,
|
||||
@@ -1414,10 +1415,6 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) {
|
||||
j.headerJarFile = j.implementationJarFile
|
||||
}
|
||||
|
||||
if j.shouldInstrumentInApex(ctx) {
|
||||
j.properties.Instrument = true
|
||||
}
|
||||
|
||||
// enforce syntax check to jacoco filters for any build (http://b/183622051)
|
||||
specs := j.jacocoModuleToZipCommand(ctx)
|
||||
if ctx.Failed() {
|
||||
|
Reference in New Issue
Block a user