G'day
There's been a bit of discussion about what is the best name for what
is currently referred to as "Dependency Resolve Actions".
Docs for this new feature are at
http://gradle.org/docs/nightly/userguide/dependency_management.html#sec:dependency_resolution.
One suggestion (mine) is "Dependency Resolve Hooks", since this is a
way for you to hook into the dependency resolution process.
Something else to bear in mind: we currently have a very green
(incomplete) DSL for controlling the use of cached entries in
dependency resolution. This DSL allows one to implement rules like
"never use a cached entry for modules matching org.gradle.*". There
are a lot of synergies with this DSL and the new 'Dependency Resolve
Actions' DSL.
Just for context, the cache-control DSL looks like this. It could
definitely use some more work, but this should give you an idea.
-----------------
configurations.all {
resolutionStrategy.resolutionRules.with {
eachModule({ moduleResolve ->
if (moduleResolve.request.version.endsWith('-CHANGING')) {
moduleResolve.cacheFor(0, SECONDS)
// Other possible 'actions'
moduleResolve.refresh() // Force reload
moduleResolve.useCachedResult() // Use cached result,
regardless of age. Offline support uses this.
}
} as Action)
eachArtifact({ artifactResolve ->
if
(artifactResolve.request.moduleVersionIdentifier.version.endsWith('-CHANGING'))
{
artifactResolve.cacheFor(0, SECONDS)
}
} as Action)
}
}
-------------------------
--
Darrell (Daz) DeBoer
Principal Engineer, Gradleware
http://www.gradleware.com
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email