Add Jacoco support
Add support for instrumenting jars with jacoco. Unlike in Make, Jacoco in Soong is done entirely using jars. Instrumentation is enabled by EMMA_INSTRUMENT=true, and affects all apps. If EMMA_INSTRUMENT_FRAMEWORK=true then it also affects any java libraries listed in InstrumentFrameworkModules. Bug: 69629238 Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false Change-Id: If699715b277529cd7322ffca67c23b0746e1cccd
This commit is contained in:
@@ -54,6 +54,8 @@ type androidAppProperties struct {
|
||||
// list of directories relative to the Blueprints file containing
|
||||
// Android resources
|
||||
Resource_dirs []string
|
||||
|
||||
Instrumentation_for *string
|
||||
}
|
||||
|
||||
type AndroidApp struct {
|
||||
@@ -119,6 +121,10 @@ func (a *AndroidApp) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
// a.properties.Proguard.Enabled = true
|
||||
//}
|
||||
|
||||
if String(a.appProperties.Instrumentation_for) == "" {
|
||||
a.properties.Instrument = true
|
||||
}
|
||||
|
||||
a.Module.compile(ctx)
|
||||
|
||||
aaptPackageFlags := append([]string(nil), aaptFlags...)
|
||||
|
Reference in New Issue
Block a user