Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordered report tasks before verification #216

Merged
merged 2 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/kotlin/kotlinx/kover/appliers/KoverMergedApplier.kt
Original file line number Diff line number Diff line change
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)
qwwdfsad marked this conversation as resolved.
Show resolved Hide resolved

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
Original file line number Diff line number Diff line change
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