Skip to content

Commit 3dc413a

Browse files
Use aggregated jacoco report
1 parent 913145f commit 3dc413a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

build.gradle

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
plugins {
2+
id 'jacoco-report-aggregation'
23
id 'com.github.hierynomus.license' version '0.16.1'
34
id 'com.github.johnrengelman.shadow' version '7.1.2' apply false
45
id 'com.jfrog.artifactory' version '4.28.1'
56
id 'org.sonarqube' version '7.1.0.6387'
67
}
78

9+
dependencies {
10+
jacocoAggregation project(':plugin-api')
11+
jacocoAggregation project(':check-api')
12+
jacocoAggregation project(':test-fixtures')
13+
}
14+
815
allprojects {
916
apply plugin: 'com.jfrog.artifactory'
1017
apply plugin: 'maven-publish'
@@ -71,6 +78,7 @@ allprojects {
7178
sonarqube {
7279
properties {
7380
property 'sonar.buildString', version
81+
property 'sonar.coverage.jacoco.xmlReportPaths', "${rootDir}/build/reports/jacoco/aggregate.xml"
7482
}
7583
}
7684

@@ -94,6 +102,7 @@ subprojects {
94102
jacocoTestReport {
95103
reports {
96104
xml.required = true
105+
xml.outputLocation = file("${rootDir}/build/reports/jacoco/aggregate.xml")
97106
csv.required = false
98107
html.required = false
99108
}
@@ -131,7 +140,9 @@ subprojects {
131140
from javadoc.destinationDir
132141
}
133142

134-
rootProject.tasks["sonarqube"].dependsOn jacocoTestReport
143+
rootProject.tasks.named('sonarqube') {
144+
dependsOn tasks.named('testCodeCoverageReport', JacocoReport)
145+
}
135146

136147
apply plugin: 'signing'
137148

0 commit comments

Comments
 (0)