Skip to content

How to check branch and statement coverage in 3.0? #93

Closed
@dsilvasc

Description

@dsilvasc

In 2.x, we could have our builds check both branch and statement coverage:

val checkBranchCoverage = tasks.register("checkBranchCoverage", OverallCheckTask::class.java) {
  dependsOn(reportScoverage)
  coverageType = CoverageType.Branch
}

val checkStatementCoverage = tasks.register("checkStatementCoverage", OverallCheckTask::class.java) {
  dependsOn(reportScoverage)
  coverageType = CoverageType.Statement
}

val checkCoverage = tasks.register("checkCoverage") {
  dependsOn(checkStatementCoverage, checkBranchCoverage)
}

but since coverageType and minimumRate moved from the task config to the project config (in ScoverageExtension), this won't work anymore.

How can we check both in 3.x?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions