Ken Yee
04/09/2025, 7:25 PMtasks.named<Test>("test") {
useJUnit()
beforeTest {
logger.lifecycle("Running unit test: $it")
}
}
It wants a closure instead for the beforeTest bit:
Argument type mismatch: actual type is 'Function0<Unit>', but '(Closure<Any!>..Closure<*>?)' was expected.
How do you specify a closure in kotlin-dsl?Adam
04/09/2025, 7:43 PMKen Yee
04/09/2025, 7:48 PMKotlinClosure2 in Kotlin DSL to produce the Groovy closure
thanks!Ken Yee
04/09/2025, 7:49 PMbeforeTest(closureOf<TestDescriptor> { logger.lifecycle("Test: $this") })Adam
04/09/2025, 7:50 PMVampire
04/10/2025, 6:53 AM--info to see what test is executed afair, or run through an IDE that displays currently executing testsKen Yee
04/10/2025, 9:14 AMVampire
04/10/2025, 10:11 AM--info 🙂