Skip to content

Commit 11d9755

Browse files
ninja: small QoL improv for developers w/r/t tests
1 parent 74e5ede commit 11d9755

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

server/build.gradle.kts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
12
import org.openapitools.generator.gradle.plugin.tasks.GenerateTask
23

34
plugins {
@@ -109,9 +110,16 @@ sourceSets {
109110
tasks.check {
110111
dependsOn(deltaTest)
111112
}
112-
113+
tasks.register("devCheck") {
114+
dependsOn(tasks.spotlessApply)
115+
finalizedBy(tasks.check)
116+
description = "Useful command when iterating locally to apply spotless formatting then running all the checks"
117+
}
113118
tasks.withType<Test> {
114119
systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
120+
testLogging {
121+
exceptionFormat = TestExceptionFormat.FULL
122+
}
115123
}
116124

117125
val deltaTestClasses =
@@ -145,6 +153,9 @@ tasks.check {
145153
finalizedBy(tasks.jacocoTestReport)
146154
}
147155

156+
tasks.jacocoTestReport {
157+
dependsOn(tasks.check) // tests are required to run before generating the report
158+
}
148159

149160
val classesToExclude = listOf(
150161
"**" + File.separator + "generated" + File.separator + "**.class",

0 commit comments

Comments
 (0)