Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Jan 22, 2025
1 parent 144bc0e commit 64d5916
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions sonar/src/main/kotlin/com/bakdata/gradle/SonarPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ import org.gradle.api.Project
import org.gradle.api.logging.Logging
import org.gradle.api.plugins.JavaPlugin
import org.gradle.api.tasks.testing.Test
import org.gradle.kotlin.dsl.*
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.withType
import org.gradle.testing.jacoco.plugins.JacocoPluginExtension
import org.gradle.testing.jacoco.tasks.JacocoReport

Expand Down Expand Up @@ -79,16 +81,6 @@ class SonarPlugin : Plugin<Project> {
}
}
}

if (subprojects.isNotEmpty()) {
// using a newer feature of sonarqube to use the xml reports which also makes it language-agnostic
configure<org.sonarqube.gradle.SonarExtension> {
properties {
property("sonar.coverage.jacoco.xmlReportPaths",
rootProject.tasks.withType<JacocoReport>().map { it.reports.xml.outputLocation.asFile })
}
}
}
}
}
}

0 comments on commit 64d5916

Please sign in to comment.