I have tried both approach shared here and on another discussion board.
Inside jacocoTestReport - suggested in this blog
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(
dir: "build/classes/main", exclude: ['*/com.X.Y.P/**'])
})
}
and inside sonarqube as suggest in one another question
property "sonar.coverage.exclusions", "*/com.X.Y.P/**"
But none of them is working for me.
Gradle version - 2.13
jacoco toolVersion = "0.7.4.201502262128"
sonarqube-gradle-plugin:1.2
springBootVersion = '1.5.9.RELEASE'