Hi Phil,
Here is a clearDomainCache task that we use at work occasionally, it
might be useful to you:
[code]
task('clearDomainCache', type: Delete, group: 'Utilities',
description: "Deletes any cached artifacts with the domain of
com.myCompany in the Gradle or Maven2 cache directories.") << {
def props = project.properties
def userHome = System.getProperty('user.home')
def domain = props['domain'] ?: 'com.myCompany'
def slashyDomain = domain.replaceAll(/\./, '/')
file("${userHome}/.gradle/cache").eachFile { cacheFile ->
if (cacheFile.name =~ "^$domain|^resolved-$domain") delete
cacheFile.path
}
delete "${userHome}/.m2/repository/$slashyDomain"
}
[/code]
We use it to clear out our companies cached artifacts, it basically just
deletes anything starting with a given domain.
Probably not the most ideal thing, but it works and keeps the redownloading
down to only a few artifacts usually.
Cheers, hope that helps.
Eric
--
Learn from the past. Live in the present. Plan for the future.
Blog: http://eric-berry.blogspot.com
jEdit <http://www.jedit.org> - Programmer's Text Editor
Bazaar <http://bazaar.canonical.com> - Version Control for Humans