Skip to content

Commit

Permalink
Ordered report tasks before verification
Browse files Browse the repository at this point in the history
Resolves #209
  • Loading branch information
shanshin committed Aug 22, 2022
1 parent 5e50881 commit b904d57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/kotlin/kotlinx/kover/appliers/KoverMergedApplier.kt
Expand Up @@ -92,6 +92,8 @@ private class ProcessMergeExtensionAction(private val extension: KoverMergedConf
// TODO `onlyIf` block moved out from config lambda because of bug in Kotlin compiler - it implicitly adds closure on `Project` inside onlyIf's lambda
verifyTask.onlyIf { extension.verify.hasActiveRules() }

// ordering of task calls, so that if a verification error occurs, reports are generated and the values can be viewed in them
verifyTask.shouldRunAfter(xmlTask, htmlTask)

container.tasks.create(MERGED_REPORT_TASK_NAME) {
it.group = VERIFICATION_GROUP
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/kotlinx/kover/appliers/KoverProjectApplier.kt
Expand Up @@ -68,6 +68,8 @@ internal fun Project.applyToProject() {
// TODO `onlyIf` block moved out from config lambda because of bug in Kotlin compiler - it implicitly adds closure on `Project` inside onlyIf's lambda
verifyTask.onlyIf { extension.verify.hasActiveRules() }

// ordering of task calls, so that if a verification error occurs, reports are generated and the values can be viewed in them
verifyTask.shouldRunAfter(xmlTask, htmlTask)

tasks.create(KoverNames.REPORT_TASK_NAME) {
it.group = KoverNames.VERIFICATION_GROUP
Expand Down

0 comments on commit b904d57

Please sign in to comment.