-
Notifications
You must be signed in to change notification settings - Fork 13
/
sonar.gradle
33 lines (28 loc) · 1.16 KB
/
sonar.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
tasks.register("codeCoverageReport", JacocoReport) {
subprojects { subproject ->
subproject.plugins.withType(JacocoPlugin).configureEach {
subproject.tasks.matching({ t -> t.extensions.findByType(JacocoTaskExtension) }).configureEach { testTask ->
sourceSets subproject.sourceSets.main
executionData(testTask)
}
subproject.tasks.matching({ t -> t.extensions.findByType(JacocoTaskExtension) }).forEach {
rootProject.tasks.codeCoverageReport.dependsOn(it)
it.finalizedBy(jacocoTestReport)
}
}
}
reports {
xml.required = true
html.required = true
}
}
sonarqube {
properties {
property 'sonar.projectName', 'Lhotse'
property 'sonar.projectKey', 'everest-engineering_lhotse'
property 'sonar.organization', 'everestengineering'
property 'sonar.host.url', 'https://sonarcloud.io'
property 'sonar.coverage.jacoco.xmlReportPaths', ["${project.rootDir}/build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml"]
property 'sonar.test.exclusions', '**/*Test.java'
}
}