jellyfin-androidtv/build.gradle.kts
David Fairbrother 480a71d1a6 Emit JUnit output whilst running gradle through CLI
Tweaks the gradle script to forward on test failures in a way that the
stack trace is preserved.

Previously, the stack pointed to a line after the test suite, e.g. line
101 on an 80 line file.
2021-12-28 18:54:17 +01:00

43 lines
890 B
Plaintext

plugins {
alias(libs.plugins.detekt)
}
buildscript {
dependencies {
classpath(libs.android.gradle)
classpath(libs.kotlin.gradle)
}
}
subprojects {
apply<io.gitlab.arturbosch.detekt.DetektPlugin>()
detekt {
buildUponDefaultConfig = true
ignoreFailures = true
config = files("$rootDir/detekt.yaml")
basePath = rootDir.absolutePath
reports {
sarif.enabled = true
}
}
}
tasks.withType<Test> {
// Ensure Junit emits the full stack trace when a unit test fails through gradle
useJUnit()
testLogging {
events(
org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED,
org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_ERROR,
org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
)
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
showExceptions = true
showCauses = true
showStackTraces = true
}
}