Jacoco coverage not shown neither with exec nor with xml

I am trying desperately to get jacoco’s coverage into sonarqube but don’t get it to work.
Please have a look at the following travis config:

I have tried multiple things:

  • using the *.exec file with -Dsonar.jacoco.reportPaths
  • using the *.xml report with -Dsonar.coverage.jacoco.xmlReportPaths
  • I have set -Dsonar.jacoco.reportMissing.force.zero=true but still nothing, not even 0%

As you can see from the travis log, the files which I reference are all there (the head commands find the files):
https://travis-ci.org/robstoll/tutteli-spek-extensions/builds/434776896

I also tried out the sonarqube gradle-plugin but with the same results, meaning no coverage is uploaded as it seems. From the travis log you can see that it always states 19:59:39.313 DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project

As side notice, jacoco works, when I am generating the html report (locally) it looks as it should, meaning the coverage is there.

I would appreciate any hint. I don’t know what I am doing wrong (or might it be that sonarcloud is not compatible with jacoco 0.8.2?). following the project on sonarcloud:
https://sonarcloud.io/dashboard?id=robstoll_tutteli-spek-extensions

Seems like the JacocoSensor only picks up if there are java files involved (I added a dummy file). Yet, also then I don’t get any reports but at least I see why:

20:30:09.616 WARN: Property 'sonar.jacoco.reportMissing.force.zero' is deprecated and its value will be ignored.
20:30:09.618 INFO: No JaCoCo analysis of project coverage can be done since there is no class files.

So I added build/classes to -Dsonar.sources but this did not help, still the same message :frowning:
I hope that this extra info gives someone else a clue why it does not work. In the end I would like to remove the Java dummy class.

Hi,

Coverage for Kotlin project is not yet available on SonarCloud, see SonarKotlin code coverage

Thanks for the information and link.