So my company just recently switched to gradle and we’re having an interesting situation. The way our deploy process works is that we:
- build on a master machine
- rsync the build directory to slave machines, which actually run the code
This has been working fine and all but we ran into a bug (on our side) which makes me very curious about how gradle stores that a file is up to date. The bug we ran into was:
- We we’re excluding the output of a task A from being rsync’d
- Our old build system did generate the file so an old copy did exist on the slave
- On the slave machine, rerunning task A did not attempt to regenerate the file (hypothetically it should have since the input file is newer than the output file)
So what I think is happening is that gradle stashes hashes of the input files and output filenames. Because the input hash matched the file that was sync’d, and the output file existed (from the old build sytem), gradle thought the task was up to date… Does that sound right?