Gradle jacoco plugin shows excluded packages with 0% coverage


(Christoph Sturm) #1

If I exclude a package from coverage reporting via

  test {

jacoco {

excludes = [“com.blah.*”]

} }

it is excluded in the jacoco runtime but not in the report generation. this results in the package having 0% coverage in the jacoco report


(Luke Daley) #2

Any chance of getting a complete sample we can use to create a fix?


(Frankie Sardo) #3

You can see it in the java quickstart example if you add:

test.jacoco.excludes << “*Person”

I made a quick example in github https://github.com/frankiesardo/jacoco-example As you see if you ignore a file the test coverage drops to 50% instead of being 100%


(Luke Daley) #4

I’ve raised GRADLE-2955 for this.