I am studying Gradle and trying to understand how input and output files determine if a task is relevant.
This task is never updated, even if the assembly file does not change.
task printFoo() { inputs.file(getBuildFile()) doLast { println 'foo' } }
This task is always relevant, even if the assembly file is modified.
task printFoo() { outputs.file(getBuildFile()) doLast { println 'foo' } }
I expected both examples to consider the task obsolete only when the assembly file changes and is updated otherwise. What am I missing?
source share