I have a gradle project that has a dependency on another gradle project. Dependence is published on our internal nexus server and can be easily resolved.
After the dependency has been cached locally, I cannot update it unless I switch to --refresh-dependencies for the gradle command (or delete it manually from the cache).
Having been on the Internet, I found many people with the same problem, and it was suggested to mark the dependency as a change (although this is not strictly necessary, since it is implicit from the name -SNAPSHOT) and add this:
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
however this does not work for me, it will always use the cached version until 24 hours by default gradle is set, after which it will be reloaded.
Does anyone know what else I can lose, or how I can diagnose what gradle does and why it is not going to download new versions? nexus
source
share