I have a custom (groovy) Task class, and it’s set of output files is not directly represented as a property (which I could annotate), but is computed from two different configuration properties.
I can of course programmatically register these with the TaskOutputs from within the task class, but the question is when to call that registering code.
It needs to be called after the task is completely configured, to ensure that both properties are set, but it needs also to be called before the upToDate state of the task is evaluated.
Unfortunately ‘TaskContainer.whenTaskAdded()’ fires before the task is configured. Is 'taskGraph.whenReady()'suitable, or has the up-to-date state already been determined then?
Or what else would be the cleanest, most idiomatic way to handle this?