File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ dependencies {
4646test {
4747 jvmArgs ' --add-opens' , ' java.base/java.util=ALL-UNNAMED'
4848 jvmArgs ' --add-opens' , ' java.base/java.lang=ALL-UNNAMED'
49- jvmArgs " -javaagent:${ project.rootDir} /dist/agent.jar=mode=daemon-disabled"
5049 jvmArgs ' -Dnet.bytebuddy.experimental=true' // Mockito support.
5150
5251 systemProperty ' AIK_agent_dir' , " ${ project.rootDir} /dist"
@@ -64,6 +63,13 @@ test {
6463 jacoco {
6564 enabled = true
6665 }
66+ doFirst {
67+ // JaCoCo's javaagent must load before our own agent.jar. Our agent registers a
68+ // retransformation-capable ByteBuddy transformer; if it loads first, JaCoCo silently
69+ // stops recording coverage for almost every class, not just the ones we instrument.
70+ jvmArgs jacoco. getAsJvmArg(), " -javaagent:${ project.rootDir} /dist/agent.jar=mode=daemon-disabled"
71+ jacoco. enabled = false
72+ }
6773}
6874
6975jacocoTestReport {
You can’t perform that action at this time.
0 commit comments