How to minimize creation of cached SHA1 folders for uneeded old downloads

I am using gradle 1.0-rc3

Multiple builds repeatedly download the SNAPSHOT from IVY (maven 1) into a NEW folder (causing accumulation of unneeded artifacts consuming a lot of space)

See the attached image for an example of the new folders created.


Is there a setting to remove old SHA1 folders (rather than creating new ones at each build).??

I have this snippet in my build.gradle: configurations.all {

// check for updates every build for artifacts with ‘changing: true’

resolutionStrategy.cacheChangingModulesFor 0, ‘seconds’ }

dependencies {

testCompile group: ‘junit’, name: ‘junit’, version: ‘3.8.1’

groovy group: ‘org.codehaus.groovy’, name: ‘groovy-all’, version: ‘1.8.5’

archives group: ‘spectrum-installer’, name: ‘spectrum-installer-weblogic’, version: System.getProperty(‘installer.version’), ext: ‘zip’, changing: true

// SNAPSHOTs are changing


There is not currently any built-in mechanism for expiring old/unused entries from the cache. This is GRADLE-1908.

Gradle will tolerate these files being removed, but for now you’re stuck with using another mechanism to cleanup these files, like a shell script.

Ok, thanks.

At least I got a quick reply.

I should be able to work around that.

Thanks again