Skip to content

Instantly share code, notes, and snippets.

@nwillc
Created February 18, 2018 18:15
Show Gist options
  • Save nwillc/ea9826f9a0f201eb8537306823c9a286 to your computer and use it in GitHub Desktop.
Save nwillc/ea9826f9a0f201eb8537306823c9a286 to your computer and use it in GitHub Desktop.
Gradle build using JUnit5 and Jacoco
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.1.0-RC1'
}
}
apply plugin: "jacoco"
apply plugin: 'org.junit.platform.gradle.plugin'
repositories {
jcenter()
}
dependencies {
compile 'org.junit.jupiter:junit-jupiter-api:5.1.0-RC1'
testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.1.0-RC1'
}
junitPlatform.enableStandardTestTask true
jacoco {
toolVersion = '0.7.9'
applyTo junitPlatformTest
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment