Sonarqube task in Gradle does not produce test coverage
<p>I have multi-project Gradle script. I added to the root project:</p>

<pre><code>buildscript {
    repositories{
        ...
    }

    dependencies { classpath("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.2.1") }
}

apply plugin: org.sonarqube.gradle.SonarQubePlugin

sonarqube {
    properties {
        property "sonar.junit.reportsPath", "$projectDir/build/test-results/test"
        property "sonar.host.url", "http://localhost:9000"
        property "sonar.verbose", "true"
    }
}
</code></pre>

<p>Sonarqube shows the correct number of tests, but coverage is 0.</p>

<p>I use Gradle 3.0, Java 1.8.0_45, Sonarqube 6.1. </p>

<p>Gradle console shows many "Class not found" messages.</p>

<p>Gradle console also shows message: </p>

<blockquote>
  <p>"Reports path contains no files matching TEST-.*.xml :
  myPath\build\test-results\test"</p>
</blockquote>

<p>, which is correct, since that particular project does not have any tests.</p>