I am trying to do Sonar Setup with Jacoco for Kotlin to generate a Code Coverage report, but it does not show any code coverage. Checking the Sonar Console, it shows the following error. Before anyone came across this question, any suggestion on what to skip.
Meta info
plugin using sonarqube version "2.6.1"
gradleVersion = '3.0.1'
kotlinVersion = '1.2.21'
Sonarqube Version = Version 6.7.1 (Build 35068) - LGPL v3
Disappointing the part, my installation project creates a clean code coverage report :(. PFA.

Edit: find the project structure.
I am adding a sonar & Jacoco gradle file setting that I use to generate a sonar matrix report.

Here is the sonar.gradle file:
sonarqube { properties { property "sonar.projectKey", "jacoco.sonar.test" property "sonar.projectName", "Sonar Jacoco Test" property "sonar.projectVersion", "1.1" property "sonar.java.source", "7" property "sonar.android.lint.report", "build/outputs/lint-results.xml" property "sonar.java.binaries", "build/tmp/kotlin-classes" property "sonar.java.test.binaries", "build/intermediates/classes/test/,build/tmp/kotlin-classes/devDebugUnitTest" property "sonar.tests","src/test/java" property "sonar.sources","src/main/java" property "sonar.java.coveragePlugin", "jacoco" property "sonar.jacoco.reportPaths","build/jacoco/testDevDebugUnitTest.exec" property "sonar.junit.reportsPath","build/test-results/testDevDebugUnitTest" } }
and here is the jacoco.gradle file
apply plugin: 'jacoco' jacoco { toolVersion = "0.7.9" reportsDir = file("${project.projectDir}/app/build/reports") } task jacocoTestReport(type: JacocoReport, dependsOn: "app:testDevDebugUnitTest") { group = "Reporting" reports { xml.enabled = true html.enabled = true } def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/*$ViewInjector*.*', '**/*$ViewBinder*.*', '**/*$MembersInjector*.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*'] classDirectories = fileTree( dir: "${project.projectDir}/app/build/intermediates/classes/dev", excludes: fileFilter ) + fileTree( dir: "${project.projectDir}/app/build/tmp/kotlin-classes/devDebug", excludes: fileFilter ) // sources sourceDirectories = files(["${project.projectDir}/app/src/main/java"]) executionData = files("${project.projectDir}/app/build/jacoco/testDevDebugUnitTest.exec") }
After the gradient commands, I use Jacobo to generate the report, and then to report the fall.
./gradlew clean jacocoTestReport sonarqube
I noticed that after I receive, there must be some way.
Coverage information has not been collected. Did you forget to include debugging information in compiled classes?
Sorry if this looks a bit; but this is the best I have found to take stock in one place. Also note that I tried a similar setup with a Java class instead of kotlin, creating a report with code coverage.