more of a gradle question, but I encountered an annoying issue where dependency versions had changed but the class cache wasn't being invalidated and the source wasn't getting rebuild. I eventually just deleted the whole cache on the CI server and that fixed it. Wondering though if there's a better way to have gradle cache a little less aggressively
g
gildor
12/24/2017, 4:31 PM
Do you use dynamic version of dependency?
If so, you can change dependency cache lifetime:
Copy code
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
x
xenoterracide
12/25/2017, 1:02 AM
I set that to one minute but even after 5 minutes had passed it didn't seem to help
g
gildor
12/25/2017, 1:55 AM
Hm, works for me for snapshot versions
gildor
12/25/2017, 1:59 AM
BTW did you apply this config to module with dynamic dependency?