Whats the current state of this issue? Is this part of the roadmap due increased importance of KMM projects.
I’ve tried several configurations:
My module structure:
/module/src/commonMain
/module/src/commonTest
/module/src/androidMain
/module/src/androidTest
Plugin configuration:
property(“sonar.sources”, buildutils.SonarQubeUtils.sourcePaths)
property(“sonar.tests”, buildutils.SonarQubeUtils.testPaths)
property(“sonar.junit.reportPaths”, “$buildDir/test-results/testDebugUnitTest”)
object SonarQubeUtils {
val sourcePaths = listOf(
"src/commonMain/kotlin",
"src/androidMain/kotlin",
).joinToString(separator = ",")
val testPaths = listOf(
"src/commonTest/kotlin",
"src/androidTest/kotlin",
).joinToString(separator = ",")
}
then running gradle sonarqube:
Resource not found: package.TrackingTest under the directory /XX while reading test reports. Please, make sure your “sonar.junit.reportPaths” property is configured properly
Whats the problem?
junit.reportPaths targets /test-results/testDebugUnitTest/TEST-package.TrackingTest.xml but the error message reports test class not found. Above I defined sonar.test with commonTest where the plugin should find the class (src/commonTest/kotlin/package/TrackingTest.kt)
SonarQube plugin version: 3.2.0