DefaultTemporaryFileProvider does not clean up temp files

We’re seeing our build server’s /tmp directories filling up with lots of gradle* files. They appear to come from DefaultTemporaryFileProvider. While we can play with java.io.tmpdir for TmpDirTemporaryFileProvider to move the directory, it doesn’t change the fact that “temporary” files are hanging around for ever. Is there a ticket or plan to have these temp files cleaned up after the build? E.g. call deleteOnExit for all temp files.

We have also seen occasional errors where a temp file is available later in the build because it was deleted at some point. I think it’s related to some concurrency problem in DefaultTemporaryFileProvider, though I believed File.createTempFile to be thread safe.