I am working on a custom Plugin / Task that is using input from both the javaCompile
task as well as (ideally) processResources
task. After a bit of a learning curve I think do understand lazy configuration using the javaCompile
task and it works as expected by basically setting the input property of my custom task with the javaCompile
Task’s getDestinationDirectory()
property. This also covers incremental changes nicely.
Here is my question: How would this work for the ProcessResources
task?
It does not provide a way to return a DirectoryProperty
. ProcessResources
only provides getDestinationDir
which returns a File
. My understanding is that getDestinationDir
is part of the old APIs as the javaCompile
task has this property as well but that is deprecated.
Therefore, is there are way for the processResources
task to support Lazy Configuration? Is that a missing feature? If not, what is the idiomatic way to use its output in custom tasks? Is it best to use the old-school “dependsOn”?