I configured my CI server to publish artifacts in an ivy local repository. So it does it about every minute Each time, this leads to a gradle_uploadXXXSHA1 file into /tmp for each artifact for each build that seems never cleaned up. several hundreds files per day
I use with gradle 1.11, below is my publishing conf.
Is this a known bug, or is there an option to avoid this ?
I use 2.0 and I face the same problem. My CI server is on an SSD and it builds at least 60 builds a day, so my /tmp gets flooded with the temp files. Hope someone from the gradle team can share some info on this.
Typically, Gradle puts temp files into either the Java temp dir or ‘build/tmp’. It might be worthwhile to check if ‘gradle_uploadXXXSHA1’ is written by Gradle or an underlying library, and if it’s written by Gradle, use ‘Task#getTemporaryDir’ (which will go under ‘build/tmp’).
This does remind me. In unit testing code for gradle plugins one has to set the projectDir to something below ‘build/tmp’ otherwise by default it would create a directory under the OS’s temp directory.