Skip to content

Commit 21256ff

Browse files
authored
Fixup sonar analysis report paths (#65)
* Update build.gradle * Update java-ci.yml
1 parent 27d1e0e commit 21256ff

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/java-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
runs-on: ubuntu-latest
3939
steps:
4040
- uses: actions/checkout@v4
41+
with:
42+
fetch-depth: 0
4143

4244
- name: Set up JDK
4345
uses: actions/setup-java@v4

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ sonarqube {
6363
property "sonar.organization", "configcat"
6464
property "sonar.host.url", "https://sonarcloud.io"
6565
property "sonar.sources", "src/main/java/com/configcat"
66-
property "sonar.coverage.jacoco.xmlReportPaths", "${layout.buildDirectory}/reports/jacoco/report.xml"
66+
property "sonar.coverage.jacoco.xmlReportPaths", layout.buildDirectory.file("reports/jacoco/report.xml").get()
6767
}
6868
}
6969

@@ -81,7 +81,7 @@ tasks.named("jacocoTestReport", JacocoReport) {
8181
sourceSets sourceSets.main
8282
reports {
8383
xml.required.set(true)
84-
xml.destination file("${layout.buildDirectory}/reports/jacoco/report.xml")
84+
xml.destination layout.buildDirectory.file("reports/jacoco/report.xml").get().asFile
8585
html.required.set(false)
8686
csv.required.set(false)
8787
}

0 commit comments

Comments
 (0)