Skip to content

Commit 68df9f0

Browse files
build: Fix Sonar reports. (#832)
1 parent da057ec commit 68df9f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build.gradle.kts

+4
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ sonarqube {
9292
property("sonar.token", project.findProperty("s3fs.publish.sonar.token") ?: System.getenv("S3FS_PUBLISH_SONAR_TOKEN") ?: System.getenv("SONAR_TOKEN") as String)
9393
property("sonar.java.target", java.targetCompatibility)
9494

95+
val junitReports = project.layout.buildDirectory.asFile.get().resolve("test-results")
96+
property("sonar.junit.reportsPath", arrayListOf(junitReports.resolve("test"), junitReports.resolve("it-s3")).joinToString(","))
97+
9598
val branch = project.findProperty("s3fs.publish.sonar.branch") ?: System.getenv("S3FS_PUBLISH_SONAR_BRANCH")
9699
val prNumber = project.findProperty("s3fs.publish.sonar.pr.number") ?: System.getenv("S3FS_PUBLISH_SONAR_PR_NUMBER")
97100
val prBranch = project.findProperty("s3fs.publish.sonar.pr.branch") ?: System.getenv("S3FS_PUBLISH_SONAR_PR_BRANCH")
@@ -163,6 +166,7 @@ tasks {
163166

164167
named<Test>("test") {
165168
description = "Run unit tests"
169+
outputs.upToDateWhen { false }
166170
useJUnitPlatform {
167171
filter {
168172
excludeTestsMatching("*IT")

0 commit comments

Comments
 (0)