Skip to content

Commit 51bf571

Browse files
Use aggregated jacoco report
1 parent 913145f commit 51bf571

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ plugins {
33
id 'com.github.johnrengelman.shadow' version '7.1.2' apply false
44
id 'com.jfrog.artifactory' version '4.28.1'
55
id 'org.sonarqube' version '7.1.0.6387'
6+
id 'jacoco-report-aggregation'
7+
}
8+
9+
dependencies {
10+
jacocoAggregation project(':plugin-api')
11+
jacocoAggregation project(':check-api')
12+
jacocoAggregation project(':test-fixtures')
613
}
714

815
allprojects {
@@ -94,6 +101,7 @@ subprojects {
94101
jacocoTestReport {
95102
reports {
96103
xml.required = true
104+
xml.outputLocation = file("${rootDir}/build/reports/jacoco/aggregate.xml")
97105
csv.required = false
98106
html.required = false
99107
}
@@ -131,7 +139,9 @@ subprojects {
131139
from javadoc.destinationDir
132140
}
133141

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

136146
apply plugin: 'signing'
137147

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ group=org.sonarsource.api.plugin
22
version=13.4.1-SNAPSHOT
33
description=Plugin API for SonarQube, SonarCloud and SonarLint
44
org.gradle.jvmargs=-Xmx2048m
5+
# sq analysis config
6+
systemProp.sonar.coverage.jacoco.xmlReportPaths=./build/reports/jacoco/aggregate.xml

0 commit comments

Comments
 (0)