Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task customJacocoTestCoverageVerification(type: JacocoCoverageVerification, dependsOn: 'JacocoTestReport') {
- sourceDirectories = files([mainSrc])
- classDirectories = files([debugTree])
- executionData = files("${buildDir}/jacoco/testDebugUnitTest.exec")
- violationRules {
- setFailOnViolation(true)
- rule {
- element = 'PACKAGE'
- limit {
- value = 'COVEREDRATIO'
- counter = 'BRANCH'
- minimum = 0.5
- }
- }
- rule {
- element = 'PACKAGE'
- limit {
- value = 'COVEREDRATIO'
- counter = 'INSTRUCTION'
- minimum = 0.8
- }
- }
- rule {
- element = 'PACKAGE'
- includes = ['com.androidjacoco.sample.*.presenter']
- enabled = true
- limit {
- counter = 'CLASS'
- value = 'MISSEDCOUNT'
- maximum = 0
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement