vanniktech/gradle-android-junit-jacoco-plugin

Jenkins integration

nateridderman opened this issue · 2 comments

First of all, thanks for this plugin! We use it on Android projects to track coverage.

This is a feature request for better Jenkins integration. We use the Jenkins Jacoco plugin as seen here - https://wiki.jenkins.io/display/JENKINS/JaCoCo+Plugin#JaCoCoPlugin-Recordingcoverageforbuilds. We can fail a build if coverage dips below a threshold, for example. The problem is that we have to define exclusions twice: once in our gradle file for local runs, and again in our Jenkins plugin configration. It also doesn't know about our class file locations, and it's easy to misconfigure to include test classes in coverage numbers. Is there some way to avoid this duplication, and use your plugin to do all of the work, and expose the results to Jenkins? I know they support an HTML publisher which could show the coverage reports, but I think the Jacoco plugin is the only thing that can expose specific coverage to Jenkins for build health, failing builds, etc.

Yeah. You should able to use the merged report.

cc @vRallev who I think used Jenkins and this plugin seamlessly

I remember that we have a way to generate a single jacoco report that can be consumed by Jenkins. @vRallev did this when he worked at Evernote.