I just stumbled on `TaskDependency` this looks lik...
# community-support
b
I just stumbled on
TaskDependency
this looks like a useful mechanism to provide tasks that can only be generated very late (with generated names). In particular I found it instrumental to avoid
afterEvaluate
. However the javadoc is a tad misleading as it applies not only to
dependsOn
.
I would not use TaskDependency. A FileCollection or any Provider should work. What's your usecase?
b
Ouch.
On my project, I have a project that schedule checks according from data coming from a third party server. Each check is performed by a single task, whose name is generated. Previously the task registration was done in
afterEvaluate
after all providers were resolved. Given the server might be slow, I only want that to happen, when the "originating" task is actually invoked (this is currently wired as
finalizedBy
from the originating task.
Alright, using providers works too, and had the same "surface" / involvement which is nice.
Thanks for the pointer @Philip W