Publish Coverage from JaCoCo using the new Coverage API:
It makes a statement in this blog:
publishCoverage adapters: [jacocoAdapter('target/site/jacoco/jacoco.xml')]
You can also use jacoco instead of jacocoAdapter if you didn't install Jacoco-Plugin.
What does this mean? That I could use the jacoco pipeline within publishCoverage:
jacoco classPattern: 'build/classes', execPattern: 'build/jacoco/*.exec'
In order to use the JaCoCo Adapter, I would need to run jacoco to generate the test report as part of my build with Gradle.
./gradlew jacocoTestReport
Then use the output from it in publishCoverage:
publishCoverage adapters: [jacocoAdapter('build/reports/jacoco/test/jacocoTestReport.xml')]
But if the implication of the statement made in the blog is what I think it means, I would not need to run jacocoTestReport.
However the Snippet generator does not allow for it, so I am not sure.