diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 0d8c940..2044cb6 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -35,10 +35,10 @@ jobs: restore-keys: ${{ runner.os }}-sonar - name: Run tests and generate JaCoCo report - run: ./gradlew test jacocoTestReport + run: ./gradlew :app:test :app:jacocoTestReport - name: SonarCloud Scan env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: ./gradlew sonar + run: ./gradlew :app:sonar diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8e36229..6718f9f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -110,20 +110,23 @@ tasks.withType { } tasks.jacocoTestReport { + dependsOn(tasks.test) reports { xml.required = true + xml.outputLocation = layout.buildDirectory.file("reports/jacoco/test/jacocoTestReport.xml") } } +tasks.named("sonar") { + dependsOn(tasks.jacocoTestReport) +} + sonar { properties { property("sonar.projectKey", "gameyfin") property("sonar.organization", "gameyfin") property("sonar.host.url", "https://sonarcloud.io") - property( - "sonar.coverage.jacoco.xmlReportPaths", - "${layout.buildDirectory.get()}/reports/jacoco/test/jacocoTestReport.xml" - ) + property("sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/test/jacocoTestReport.xml") } } diff --git a/app/src/main/bundles/prod.bundle b/app/src/main/bundles/prod.bundle index eaeb47e..111432c 100644 Binary files a/app/src/main/bundles/prod.bundle and b/app/src/main/bundles/prod.bundle differ