aboutsummaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorSam Delmerico <delmerico@google.com>2022-09-07 12:07:07 -0400
committerSam Delmerico <delmerico@google.com>2022-09-09 16:50:38 -0400
commit1e3f78f866504a99ecf30fd7dc81d2d374c544cf (patch)
treef8afb9589d371a2098ef8f356dd1d9d68a2ef280 /java/java.go
parent9be110d15168531cbcdce5a6bb4a03900bc91047 (diff)
add jacocoagent by default to Java modules
On coverage builds, R8 will fail to properly optimize and fail the build if ignore_warnings: false, because jacoco injects dependencies on jacocoagent classes, but the jacocoagent library is not part of the classpath libraries passed in to R8 in its arguments. Instead we can add jacocoagent as a libs dependency for these modules so that it will get pulled into the r8 flags. Bug: 243903417 Test: m Change-Id: Icc24cc260b896fc800125a0318308d823ccf7a83
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go
index 0251b5754..d04e52a2c 100644
--- a/java/java.go
+++ b/java/java.go
@@ -66,6 +66,8 @@ func registerJavaBuildComponents(ctx android.RegistrationContext) {
// to support the checks in dexpreoptDisabled().
ctx.FinalDepsMutators(func(ctx android.RegisterMutatorsContext) {
ctx.BottomUp("dexpreopt_tool_deps", dexpreoptToolDepsMutator).Parallel()
+ // needs access to ApexInfoProvider which is available after variant creation
+ ctx.BottomUp("jacoco_deps", jacocoDepsMutator).Parallel()
})
ctx.RegisterSingletonType("logtags", LogtagsSingleton)