Every once in a while I notice that the user home directory contains hundreds of jna#.dll files as well as lots of (usually empty) directories named "gradle_ivy_cacheClientModule#" and/or "gradle_ivy_cache#" (where # indicates a ~20 digit number). All the jna dll's are identical.
Don't know if it matters, but I'm running gradle on cygwin / windows. I found a Jira issue about this: http://jira.codehaus.org/browse/GRADLE-462 This issue is closed and has resulted in some improvements. However, there are still some problems. When a gradle build is left alone until completed, the directories are cleaned up automatically. Naturally, if I stop the gradle build using Ctrl-C, the directories are left in the user directory. The jna dll's does not seem to be removed, even on completed builds. Some thoughts and questions: 1. The user home directory does not seem like the perfect place for these temp directories and files. Why not use the temp directory from the system property "java.io.tmpdir" instead? 2. Since so many files / directories are created, they should probably reside in a common "gradle_temp" parent directory. 3. What is the jna#.dll? Why are identical copies of this dll created upon every execution of gradle? 4. The jna#.dll should be deleted when the build is finished. 5. It should be possible to let gradle clean up old temp directories and files, for instance by checking the timestamp and deleting entries older than, say, one week. Functionality fitting for the daemon? 5 b) Another option is to keep track of running builds, their pid's and temp files/directories. Then the daemon could remove existing temp files for any pid's that does not exist. Regards, Steinar -- Steinar Haugen Gausengate 12 3080 Holmestrand Phone: +47 932 08 373 Email (p): [email protected] Email (w): [email protected] Web: http://www.haugenconsulting.no
