0

I am trying to exclude a class from our jacoco report. I did the following in build.graddle file:

jacocoTestReport {
    dependsOn {
        test
    }
    reports {
        xml.enabled true
    }
    afterEvaluate {
        classDirectories.setFrom(files(classDirectories.files.collect {
            fileTree(dir: it, exclude: [
                    '**/DSApplication.class'
            ])
        }))
    }
}

It works well for excluding it from "brunch" coverage but the rest options (like "complexity" or "line") are still showing zero coverage. How can I fix that?

1 Answers1

0

Apparently there is an option in SonarQube, with we use for build, that makes proper code coverage exclude.