plugins { id 'jacoco' id 'tools.refinery.java-conventions' } dependencies { testImplementation libs.hamcrest testImplementation libs.junit.api testRuntimeOnly libs.junit.engine testImplementation libs.junit.params testImplementation libs.mockito.core testImplementation libs.mockito.junit } def jacocoTestReport = tasks.named('jacocoTestReport') jacocoTestReport.configure { dependsOn test reports { xml.required = true } } tasks.named('test') { useJUnitPlatform { excludeTags 'slow' } finalizedBy jacocoTestReport } tasks.register('slowTest', Test) { useJUnitPlatform() finalizedBy jacocoTestReport }