Skip to content

Commit bf6ae4b

Browse files
Fix jacoco code coverage (#1828)
1 parent 3ffe294 commit bf6ae4b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

gradle/jacoco.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def jacocoExclusions = [
2121
'**/io/temporal/internal/docker/RegisterTestNamespace**'
2222
]
2323

24+
def jacocoSubprojects = (subprojects- project(':temporal-bom'))
25+
2426
reporting {
2527
reports {
2628
testCodeCoverageReport(JacocoCoverageReport) {
@@ -36,18 +38,21 @@ testCodeCoverageReport {
3638
}
3739

3840
getClassDirectories().setFrom(files(
39-
subprojects.collect {it.fileTree(dir: "${it.buildDir}/classes", exclude: jacocoExclusions)}
41+
jacocoSubprojects.collect {it.fileTree(dir: "${it.buildDir}/classes", exclude: jacocoExclusions)}
4042
))
4143
}
4244

4345
coverallsJacoco {
4446
reportPath = "build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml"
45-
reportSourceSets = subprojects.sourceSets.main.allSource.srcDirs.flatten()
47+
reportSourceSets = jacocoSubprojects.sourceSets.main.allSource.srcDirs.flatten()
4648
}
4749

4850
tasks.coverallsJacoco.dependsOn(testCodeCoverageReport)
4951

5052
subprojects {
53+
if (name == 'temporal-bom') {
54+
return
55+
}
5156
apply plugin: 'jacoco'
5257

5358
jacoco {

0 commit comments

Comments
 (0)