title: Gradle "changing" dependencies management
body: <p>I want to share my problem with you. Maybe somebody faced this problem also and will have solution.
  In brief Gradle doesn't resolve frequently changing dependencies.
  We're using:</p>
  
  <pre><code>./gradlew -v
  
  ------------------------------------------------------------
  Gradle 2.12
  ------------------------------------------------------------
  
  Build time:   2016-03-14 08:32:03 UTC
  Build number: none
  Revision:     b29fbb64ad6b068cb3f05f7e40dc670472129bc0
  
  Groovy:       2.4.4
  Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
  JVM:          1.8.0_66 (Oracle Corporation 25.66-b17)
  OS:           Linux 2.6.18-409.el5 amd64
  </code></pre>
  
  <p>Let me try to explain what's happened. 
  We have some project  that have dependency of another independent project.
  Both are under active development.
  One is: <strong>string-parser</strong> version: 1.0.0-SNAPSHOT
  Second is: <strong>tools-utils</strong> version: 2.2.0-SNAPSHOT
  We have internal maven artifactory and we configured it in  <strong>string-parser</strong>:</p>
  
  <pre><code># some code there
  configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, TimeUnit.MILLISECONDS
  }
  
   repositories {
      mavenLocal()
      maven { url 'https://some.internal.com/deploy-snapshot'}
      maven { url 'https://some.internal.com/deploy-release'}
    }
  
  dependencies {
  # Some other dependencies listed here
    compile('com.some.group:tools-utils:2.2.0-SNAPSHOT') {
      changing = true
    }
  }
  </code></pre>
  
  <p>So when we're doing changes at local work station (Windows - I think it doesn't matter) for <strong>tools-utils</strong> and upload last snapshot artifact version to maven local and remote everything is okay. We go to <strong>string-parser</strong>  project press "reimport" button (in <strong>Intellij Idea 2016.1.2</strong>) and Gradle switch to correct dependency version.
  But if somebody does some changes and upload new version to <strong>Maven remote</strong> it won't update dependency in cache and still point to old version. To fix it we have manually delete artifact from Gradle cache and (!) from Maven Local.</p>
  
  <p>Could you please advice me something because cleaning up cache manually (or with addition step on TeamCity) is a nightmare?</p>