Created
April 27, 2018 03:02
-
-
Save jivimberg/3ee0beaa9ab8b20b48e4273378dcd30e to your computer and use it in GitHub Desktop.
Jacoco on Gradle - How to verify coverage with exclusions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jacocoTestCoverageVerification { | |
afterEvaluate { | |
classDirectories = files(classDirectories.files.collect { | |
fileTree(dir: it, exclude: [ | |
'com/example/my/package/*', | |
'com/example/service/MyApplication.kt', | |
'com/google/protobuf/*' | |
]) | |
}) | |
} | |
violationRules { | |
rule { | |
limit { | |
minimum = 0.79 | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment