Skip to content

Commit

Permalink
Replace deprecated JacocoMerge task
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Feb 21, 2024
1 parent 0008190 commit aa1efd7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions sonar/src/main/kotlin/com/bakdata/gradle/SonarPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,14 @@ class SonarPlugin : Plugin<Project> {
}

if (!subprojects.isEmpty()) {
val jacocoMerge by tasks.registering(JacocoMerge::class) {
tasks.register<JacocoReport>("jacocoRootReport") {
subprojects {
executionData(tasks.withType<JacocoReport>().map { it.executionData })
}
destinationFile = file("$buildDir/jacoco")
}
tasks.register<JacocoReport>("jacocoRootReport") {
dependsOn(jacocoMerge)
sourceDirectories.from(files(subprojects.map {
it.the<SourceSetContainer>()["main"].allSource.srcDirs
}))
classDirectories.from(files(subprojects.map { it.the<SourceSetContainer>()["main"].output }))
executionData(jacocoMerge.get().destinationFile)
reports {
html.isEnabled = true
xml.isEnabled = true
Expand Down

0 comments on commit aa1efd7

Please sign in to comment.