We use the follow code to disable the dependency cache and load a dependency with classifier. But we receive ever an old version from the cache.
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
dependencies {
compile group: 'foo', name: 'bar', version: '2.2', ext: 'jar', changing: true, classifier: 'vanilla'
}
Without a classifier it work. We use an ivy repository. The Gradle version is 2.4.
A workaround is to add the follow line:
gradle.startParameter.refreshDependencies = true