When I have the ‘outputs.upToDateWhen {false}’ line commented out, the task is sometimes considered UP-TO-DATE and not executed, even when I’m telling gradle to clean first. Other times it DOES execute the task with the line commented out. However, I haven’t been able to reproduce the problem when the outputs.upToDateWhen {false} line is added, yet. I wish I had more specific data about the scenario causing the problem, but I can’t even always reproduce the issue myself. Also, this isn’t the only Copy task that is sometimes considered UP-TO-DATE after a clean, but it’s a good example. I’ve experienced the problem with versions 1.4 and 1.5.

Are there known issues with the Copy tasks requiring the upToDateWhen trick to run in versions 1.4 and 1.5? Any idea why I would be experiencing unreliable results? Just hoping to get some thoughts or ideas about what could be going on.