Gradle does not update snapshot dependencies
<p>I have a gradle project that has a dependency on another gradle project.  The dependency is being published to our in-house nexus server and can be resolved just fine.</p>

<p>Once the dependency has been cached locally I cannot get it to be refreshed unless I pass in --refresh-dependencies to the gradle command (or delete it manually from the cache).</p>

<p>Having searched the internet I found a lot of people with the same problem and the suggestion was to mark the dependency as changing (although this is not strictly necessary as it is implicit from the name -SNAPSHOT) and to add this:</p>

<pre><code>configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
</code></pre>

<p>however this does not work for me, it will always used the cached version until the gradle default 24 hours is up and then it will re-download it.</p>

<p>Does anyone have any idea what else I may be missing, or how I can diagnose what gradle is doing and why it is not going to nexus to download new versions?</p>