Gradle jacoco plugin shows excluded packages with 0% coverage

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

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

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%

I’ve raised GRADLE-2955 for this.