Skip to content

Commit

Permalink
add exception logging in tests run from gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
morisil committed Oct 2, 2024
1 parent c44eaa2 commit a2f7356
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)

import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
Expand Down Expand Up @@ -111,6 +113,18 @@ tasks.withType<DependencyUpdatesTask> {
}
}

tasks.withType<Test>() {
testLogging {
events(
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.FAILED
)
showStackTraces = true
exceptionFormat = TestExceptionFormat.FULL
}
}

@Suppress("OPT_IN_USAGE")
powerAssert {
functions = listOf(
Expand Down

0 comments on commit a2f7356

Please sign in to comment.