mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-07 08:39:17 +00:00
Fix merging of JaCoCo reports
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
apply plugin: 'jacoco'
|
apply plugin: "jacoco"
|
||||||
|
|
||||||
def jacocoCoverageAggregate = "$buildDir/jacoco/jacocoTestAll.exec"
|
def jacocoCoverageAggregate = "$buildDir/jacoco/jacocoTestAll.exec"
|
||||||
|
|
||||||
@@ -6,17 +6,14 @@ def testedProjects() {
|
|||||||
subprojects.findAll { subproject -> subproject.plugins.hasPlugin('java') || subproject.plugins.hasPlugin('kotlin') }
|
subprojects.findAll { subproject -> subproject.plugins.hasPlugin('java') || subproject.plugins.hasPlugin('kotlin') }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gradle.projectsEvaluated {
|
||||||
configure(testedProjects()) {
|
configure(testedProjects()) {
|
||||||
|
apply plugin: "jacoco"
|
||||||
|
|
||||||
jacoco {
|
jacoco {
|
||||||
toolVersion = '0.8.1'
|
toolVersion = '0.8.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
jacocoTestReport {
|
|
||||||
sourceDirectories = files(sourceSets.main.allSource.srcDirs)
|
|
||||||
classDirectories = files(sourceSets.main.output)
|
|
||||||
}
|
|
||||||
|
|
||||||
test {
|
test {
|
||||||
reports {
|
reports {
|
||||||
junitXml.enabled = true
|
junitXml.enabled = true
|
||||||
@@ -28,13 +25,12 @@ configure(testedProjects()) {
|
|||||||
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
|
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
|
||||||
classDumpDir = file("$buildDir/jacoco/classpathdumps")
|
classDumpDir = file("$buildDir/jacoco/classpathdumps")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task jacocoMerge(type: JacocoMerge) {
|
task jacocoMerge(type: JacocoMerge) {
|
||||||
destinationFile = file(jacocoCoverageAggregate)
|
destinationFile = file(jacocoCoverageAggregate)
|
||||||
executionData = project.fileTree(dir: '.', include: '**/build/jacoco/test.exec')
|
executionData = project.fileTree(dir: '.', include: '**/build/jacoco/jacocoTest.exec')
|
||||||
}
|
}
|
||||||
|
|
||||||
sonarqube {
|
sonarqube {
|
||||||
@@ -48,4 +44,5 @@ sonarqube {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks["sonarqube"].dependsOn(jacocoMerge)
|
tasks["sonarqube"].dependsOn(jacocoMerge)
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user