Skip to content

Commit 0df5903

Browse files
committed
ci: use layout.buildDirectory to define sonar config paths
1 parent 3e7ad75 commit 0df5903

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ sonarqube {
3434
property("sonar.sourceEncoding", "UTF-8")
3535
property("sonar.host.url", "https://sonarcloud.io")
3636

37-
property("sonar.binaries", "app/build/tmp/kotlin-classes/debug")
37+
property("sonar.binaries", project(":app").layout.buildDirectory.dir("tmp/kotlin-classes/debug").get().asFile.absolutePath)
3838
// sonar requires absolute path for lint and jacoco reports!
39-
property("sonar.androidLint.reportPaths", "app/build/reports/lint-results-debug.xml")
40-
property("sonar.coverage.jacoco.xmlReportPaths", "app/build/mergedReportDir/jacocoTestReport/jacocoTestReport.xml")
39+
property("sonar.androidLint.reportPaths", project(":app").layout.buildDirectory.dir("reports/lint-results-debug.xml").get().asFile.absolutePath)
40+
property("sonar.coverage.jacoco.xmlReportPaths", project(":app").layout.buildDirectory.dir("mergedReportDir/jacocoTestReport/jacocoTestReport.xml").get().asFile.absolutePath)
4141
}
4242
}

0 commit comments

Comments
 (0)