Skip to content

Commit 9919f3e

Browse files
author
Taso Dane
committed
Add back a suggestion to make check task depend on jacocoTestReport
Signed-off-by: Taso Dane <[email protected]>
1 parent 1b1245a commit 9919f3e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

subprojects/docs/src/snippets/testing/jacoco-quickstart/groovy/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ test {
3333
// end::testtask-configuration[]
3434

3535
// tag::testtask-dependency[]
36+
tasks.named("check").configure {
37+
dependsOn jacocoTestReport // running check task generates the report
38+
}
3639
tasks.named("jacocoTestReport").configure {
3740
dependsOn test // tests are required to run before generating the report
3841
}

subprojects/docs/src/snippets/testing/jacoco-quickstart/kotlin/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ tasks.test {
3232
// end::testtask-configuration[]
3333

3434
// tag::testtask-dependency[]
35+
tasks.named("check").configure {
36+
dependsOn(tasks["jacocoTestReport"]) // running check task generates the report
37+
}
3538
tasks.named("jacocoTestReport").configure {
3639
dependsOn(tasks.test) // tests are required to run before generating the report
3740
}

0 commit comments

Comments
 (0)