Включение autoUpdateHealth
в сочетании с жестко заданным порогом сделает свое дело
cobertura(
coberturaReportFile: 'coverage/cobertura-coverage.xml',
enableNewApi: true,
autoUpdateHealth: true,
autoUpdateStability: true,
failUnstable: true,
failUnhealthy: true,
failNoReports: true,
onlyStable: false
conditionalCoverageTargets: '80, 0, 0',
fileCoverageTargets: '80, 0, 0',
lineCoverageTargets: '80, 0, 0',
methodCoverageTargets: '80, 0, 0',
packageCoverageTargets: '80, 0, 0',
)