Edit: I’m using Gradle 1.10 rev 36ced393628875ff15575fa03d16c1349ffe8bb6
I have a Maven repository that I continuously upload snapshots to, which I then rely on as changing dependencies in my Gradle script. For some reason, Gradle has decided that the 2nd snapshot on the list is the most recent, despite there currently being several newer ones. Here’s part of the list of my snapshots as they appear in Nexus, with the one that Gradle is obsessed with highlighted:
In addition to this snapshot, I have 3 others that I’m building and they’re all doing the same thing. The code in my script is pretty straightforward:
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
dependencies{
providedCompile(
[group: 'com.foo', name: 'bar', version: '7.0.0-SNAPSHOT'],
(other dependencies...)
)
}
repositories {
maven {
url 'http://my.repository.com/nexus/content/groups/public'
}
mavenCentral()
}
Edit: I just tried running the build again with the --refresh-dependencies option and noticed some very strange behavior. Not only were none of my snapshot dependencies refreshed, but my 3rd party dependencies were ignored as well. I’m at a loss as to what’s going on here. I should note that my dependencies are being successfully resolved in the local cache (my build would fail otherwise) and if I delete them from the local cache, they are successfully re-downloaded.