Kelvin Chung
01/16/2025, 8:47 AMval foo by if (condition) {
tasks.registering
} else {
tasks.registering(Foo::class)
}
and I would need to do this instead:
val foo by if (condition) {
tasks.registering(DefaultTask::class)
} else {
tasks.registering(Foo::class)
}
Is this a thing in newer versions of Gradle?ephemient
01/16/2025, 8:53 AMval foo by tasks.registering(
if (condition) DefaultTask::class else Foo::class
)
anyway, and in that form you can add a configuration block etc. to the callVampire
01/16/2025, 10:42 AMFoo
configuration.
Without configuration block I agree though.