Every Gradle task has property inputs
of type TaskInputs
that represents a collection of input files for a task. This is used mainly to recognize that task is up-to-date. However, some of the input files are also marked as source files - what does it mean? In other words, what is the difference between task input file and task source file?
From the doc for TaskInput.getSourceFiles():
Returns the set of source files for this task. These are the subset of input files which the task actually does work on. A task is skipped if it has declared it accepts source files, and this collection is empty.
So it appears that source files are a subset of input files. Presumably, the task defines the "work" performed.
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