Where in com.foo:lib:1.7.x changes frequently. (x is mostly timestamp and my CI pushes a version into artifactory).
So unless I specify --refresh-dependencies, the latest lib is not fetched/downloaded. I want to avoid --refresh-dependencies so that even for stable libs that extra remote call is avoided.
Gradle caches the version for 24 hours in the case of changing and dynamic modules. As mentioned in the Controlling Caching section of the user guide, you can configure the time if you do not want the version to be cached that long.
Note that there is no point in setting changing=true for a dynamic version. Changing versions are ones that keep their number but change anyway (a.k.a SNAPSHOT versions). Dynamic versions on the other hand do change their number over time. Gradle allows you to define different timeouts for both cases.