Created
September 13, 2018 10:03
-
-
Save cdsap/e64a05e278be66d1a349970e9c2d1764 to your computer and use it in GitHub Desktop.
Spek + Kts + Jacoc
This file contains hidden or 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
val jacocoTestResultTaskName = "jacocoJunit5TestReport" | |
val junitPlatformTest: JavaExec by tasks | |
jacoco { | |
toolVersion = "0.8.2" | |
applyTo(junitPlatformTest) | |
} | |
task<JacocoReport>(jacocoTestResultTaskName) { | |
group = LifecycleBasePlugin.VERIFICATION_GROUP | |
description = "Generates code coverage report for the ${junitPlatformTest.name} task." | |
executionData(junitPlatformTest) | |
dependsOn(junitPlatformTest) | |
// sourceSets(sourceSets["main"]) | |
sourceDirectories = files("src/main/kotlin") | |
classDirectories = files("build/kotlin/main") | |
reports { | |
html.isEnabled = true | |
xml.isEnabled = true | |
csv.isEnabled = true | |
html.destination = File("$buildDir/reports/") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment