Skip to content

Commit 2fe6aa2

Browse files
Upgrade Jacoco to 0.8.13. Cleanup Gradle script. (#9180)
1 parent 036d103 commit 2fe6aa2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

gradle/jacoco.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
apply plugin: "jacoco"
1+
apply plugin: 'jacoco'
22

33
jacoco {
4-
toolVersion = "0.8.5"
4+
toolVersion = '0.8.13'
55
}
66

77
tasks.register('forkedTestJacocoData') {
8-
dependsOn "forkedTest"
8+
dependsOn 'forkedTest'
99

1010
doLast {
11-
if (file("$buildDir/jacoco/forkedTest.exec").exists()) {
11+
if (layout.buildDirectory.file('jacoco/forkedTest.exec').get().asFile.exists()) {
1212
jacocoTestReport {
1313
executionData(forkedTest)
1414
}
@@ -24,19 +24,19 @@ tasks.named('jacocoTestReport').configure {
2424
reports {
2525
xml.required = true
2626
csv.required = false
27-
html.destination file("${buildDir}/reports/jacoco/")
27+
html.outputLocation = layout.buildDirectory.dir('reports/jacoco')
2828
}
2929
}
3030

31-
if (!project.ext.hasProperty("excludedClassesCoverage")) {
31+
if (!project.ext.hasProperty('excludedClassesCoverage')) {
3232
project.ext.excludedClassesCoverage = []
3333
}
3434

35-
if (!project.ext.hasProperty("excludedClassesBranchCoverage")) {
35+
if (!project.ext.hasProperty('excludedClassesBranchCoverage')) {
3636
project.ext.excludedClassesBranchCoverage = []
3737
}
3838

39-
if (!project.ext.hasProperty("excludedClassesInstructionCoverage")) {
39+
if (!project.ext.hasProperty('excludedClassesInstructionCoverage')) {
4040
project.ext.excludedClassesInstructionCoverage = []
4141
}
4242

@@ -74,7 +74,7 @@ afterEvaluate {
7474
}
7575

7676
// Disable verification if skipTests property was specified
77-
onlyIf { !project.rootProject.hasProperty("skipTests") }
77+
onlyIf { !project.rootProject.hasProperty('skipTests') }
7878
}
7979

8080
tasks.named('jacocoTestCoverageVerification').configure {

0 commit comments

Comments
 (0)