Andrew Pietsch wrote:
Hi there,
I noticed the other day that my build fails while trying to update
snapshot dependencies if there's no network connection. Since all the
dependencies are in my cache is there anyway to make the build to
continue?
No built-in way, yet. There's a JIRA issue for this:
http://jira.codehaus.org/browse/GRADLE-320
It is possible to script an 'offline' mode in your build script. Here is
an example which uses the maven central repository when online, and the
local Gradle cache when offline:
repositories {
if (rootProject.hasProperty('offline')) {
add(new FileSystemResolver()) {
name = 'gradleCache'
addArtifactPattern("${gradle.gradleUserHomeDir}/cache/${ResolverContainer.DEFAULT_CACHE_ARTIFACT_PATTERN}")
addIvyPattern("${gradle.gradleUserHomeDir}/cache/${ResolverContainer.DEFAULT_CACHE_IVY_PATTERN}")
}
}
else {
repositories { mavenCentral() }
}
}
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email