Gradle sonarqube plugin is not uploading analysis report on subsequent runs on same branch our application is gradle kotlin. On initial run of gradle sonarqube tasks, scan results are visible on SonarQube server UI. On subsequent runs results are not updated after source code changes are made to same branch. SQ UI displays obsolete results from initial analysis and does not reflect latest changes
Following are details
- SonarQube gradle plugin: version 3.3
- SonarQube server : Community Edition Version 8.9.3(tried 9.2.4)
- Gradle : 6.9
- Kotlin : 1.4.20
- JVM : 11.0.9.1(Azul Systems, Inc. 11.0.9.1+1-LTS)
- OS : Windows 10 10.0 amd64
gradle command:
gradle clean sonarqube
-Dsonar.host.url=http://localhost:9000
-Dsonar.login=token
-Dsonar.verbose=true
sonarqube entries in build.gradle
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3'
apply plugin: "org.sonarqube"
sonarqube >{
properties {
property 'sonar.projectKey', "mykey:myproj"
property 'sonar.projectName', "myproj"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.sources", "src/main/kotlin"
property 'sonar.language', 'kotlin'
}<
}
There are no errors in logs. All directories created under projectdir/build/sonar/ after initial analysis are empty.
output from CE task
{
"task": {
"id": "AX7CXu0VnYeriyF0iIMT",
"type": "REPORT",
"componentId": "AX6xHNHtvlM2NwXtAndE",
"componentKey": "k:val",
"componentName": "val",
"componentQualifier": "TRK",
"analysisId": "AX7CXv3BhrpCXzBkYf5n",
"status": "SUCCESS",
"submittedAt": "2022-02-03T19:35:08-0600",
"submitterLogin": "admin",
"startedAt": "2022-02-03T19:35:09-0600",
"executedAt": "2022-02-03T19:35:28-0600",
"executionTimeMs": 18532,
"hasScannerContext": true,
"warningCount": 0,
"warnings": []
}
}