diff --git a/gradle/build-logic/dev/src/main/kotlin/build-logic.junit-jacoco-conventions.gradle.kts b/gradle/build-logic/dev/src/main/kotlin/build-logic.junit-jacoco-conventions.gradle.kts index 48f08fbfa8..e6febb53e4 100644 --- a/gradle/build-logic/dev/src/main/kotlin/build-logic.junit-jacoco-conventions.gradle.kts +++ b/gradle/build-logic/dev/src/main/kotlin/build-logic.junit-jacoco-conventions.gradle.kts @@ -1,3 +1,4 @@ +import org.gradle.api.tasks.testing.logging.TestLogEvent import org.gradle.kotlin.dsl.extra import org.gradle.testing.jacoco.plugins.JacocoPluginExtension import org.gradle.testing.jacoco.tasks.JacocoReport @@ -31,3 +32,17 @@ plugins.withId("jacoco") { } } } + + +//TODO 1.4.0 move this bit to tutteli-gradle-plugins, could be done there depending if com.github.vlsi.gradle-extensions +// is applied or not + +// adjust because we use com.github.vlsi.gradle-extensions which prints tests differently, otherwise we print +// the failed tests twice. +tasks.withType().configureEach { + testLogging { + // Empty enum throws "Collection is empty", so we use Iterable method + setEvents((events - TestLogEvent.FAILED) as Iterable) + showStackTraces = false + } +}