i got a Copy task i want to initialize lazyily, i.e. it operates on variables that do not exist at configuration time. after some reading, it seems that general approaches are to configure the task in another task it dependsOn or via doFirst… is the following idea an “ok” way to defer the task configuration to runtime (i am aware of the unknown input/output downside)?
task(doIt(type: Copy)).doFirst {
configure(it) {
from unknownPropertyAtConfigurationTime
into anotherPropertyKnownOnlyAtRuntime
}
}
thanks for feedback, zyro