If my task change some property and when execute it twice incremental build can not be accomplished. And every time this task has to be executed again. Can I use upToDateWhen() method to do some check for the property?
Is there some purpose that property can not be declared as task output?
The image is from: (Muschko, Benjamin. "Hooking into the Build Lifecycle." Gradle in Action. N.p.: n.p., 2014)
A task's input and output declarations are used to determine whether a task is "up to date" since the last build, and can therefore be safely skipped in the current build. The absence of any output declaration means the task is always out of date when a build starts. Since properties are not persisted across builds, a task which outputs a property would always be out of date and need to be run, which is equivalent to not specifying the property as an output of the task.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With