In my own experience with gradle, in the experience of my colleagues, and in my experience answering questions on StackOverflow (like this one), people love Gradle until they use the Copy task and start tearing their hairs because the Copy task considers everything up-to-date although the ‘expand’ or ‘ReplaceTokens’ tokens have changed completely since the last build.
Typical example: you build with ‘-Penv=dev’, then build with ‘-Penv=prod’, and the development environment tokens are used in production.
And that’s really a pity, because faith in Gradle’s incremental build features then starts vanishing, and people start cleaning every time they build to avoid bad surprises.
So my question is: why aren’t these tokens part of the inputs of the copy task? They clearly have an impact on the task’s outputs, so they should be part of them.
If it’s such a problem to add them, couldn’t there be a big blinking warning in the documentation about this, explaining why this is not the case, and how to circumvent the problem?