The first scan sometimes shows coverage, but on rerun, both New Code and overall code coverage always drop to 0%. (Community Build v26.2.0.11930)
For gradle:
using below in build.gradle:
id ‘org.sonarqube’ version ‘6.0.1.5171’
tasks.named(‘test’) {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
html.required = true
csv.required = false
}
}