Last active
July 2, 2018 04:38
-
-
Save sw-samuraj/f245e6c8a05ea07d8d2bf513ff145bd1 to your computer and use it in GitHub Desktop.
A minimalistic Gradle configuration for JaCoCo with JUnit 5.
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
apply plugin: 'jacoco' | |
jacoco { | |
toolVersion = '0.7.9' | |
applyTo junitPlatformTest | |
} | |
jacocoTestReport { | |
afterEvaluate { | |
classDirectories = files(classDirectories.files.collect { | |
fileTree(dir: it, exclude: ['**/Main*']) | |
}) | |
} | |
} | |
junitPlatformTest { | |
jacoco { | |
destinationFile = file("${buildDir}/jacoco/test.exec") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lines 8 thru 14 are not required, when using the latest JUnit5