Gradle Version: 3.0
Operating System: OSX 10.11.6
Regression from 2.14.1
When inputs not changed and outputs already exist the task should be up-to-date. This works in 2.14.1, broken in 3.0. Hint: I think perhaps 3.0 considers environment as well as files for “up-to-datedness” of an Exec task and there are some env vars that are always changing? Just a guess.
Repro, use sample below and:
gradle wrapper
./gradlew execBug
./gradlew execBug
(notice was not UP-TO-DATE)
gradle oldWrapper
./gradlew execBug
./gradlew execBug
(notice is UP-TO-DATE)
I observed something similar. When I run my build with i, the following appear in the logs:
Output property '$1$59703' has been removed for task 'compileScripts'
Output property '$1$59702' has been removed for task 'compileScripts'
Output property '$1$59701' has been removed for task 'compileScripts'
I don’t add those proerties to my task outputs however, so something must be doing this internally.
I suspect these issues may be related to the new tracking properties for input/output files mentioned in the release notes. Have you tried using withPropertyName when declaring the input/output files to see if that resolves the up-to-date checking issues you are seeing?