1

I am using gradle with and jacoco plugin to collect test coverage. Although we are writing tests for equals and hashcode but I still want to exclude these from test coverage report. I tried to find this online, but no luck unfortunately..

Could someone please help...

varun
  • 684
  • 1
  • 11
  • 30

1 Answers1

-1

Take a look here

Here is an example :

jacocoTestReport {
    afterEvaluate {
        classDirectories = files(classDirectories.files.collect {
            fileTree(dir: it, exclude: ['somepackage/**'])
        })
    }
}
ToYonos
  • 16,469
  • 2
  • 54
  • 70