Gradle leaves garbage in the temporary directory

I have noticed that Gradle leaves the following files in my temporary directory forever (always creating new ones):

  1. native-platformXXXXdir/native-platform-windows-amd64.dll 2. jnaXXXX.dll

Where XXXX is a large number. I have verified this with 1.6 and 1.7-rc-2. They are left in the temporary directory in the following cases:

  • When a new daemon is started in any way (through the Tooling API or through the command line) file (1) is created and is never removed. - When I use the Tooling API both (1) and (2) is created. If the Tooling API starts a new daemon, two instances of (1) will be created. - If I run Gradle from the command line without the daemon, Gradle leaves no garbage in the temporary directory.