Reputation: 10317
When using a "+" at the end of a compile time dependency version number in Gradle, what is the exact meaning of the "+" in relation to remote repositories and caching?
Specifically, the "+" signifies a dependency version of that number or greater. However, if I have a local version cached in Gradle and a version with a higher version number in a remote repository, which version will be chosen?
repositories {
maven { url 'www.example.com' }
}
dependencies {
compile 'com.example.test:1.0.+'
}
Upvotes: 0
Views: 106
Reputation: 123960
Gradle will cache the resolved version for a while (24 hours by default), then resolve again. Here is how you would reconfigure the timeout for all configurations in a project:
configurations.all.resolutionStrategy.cacheDynamicVersionsFor(1, "hours")
For details, see the Gradle Build Language Reference.
Upvotes: 1