How can I force Gradle to set the same version for two dependencies?
Add this section to just above your dependencies
block.
Groovy/Gradle:
configurations.all {
resolutionStrategy {
force 'com.google.guava:guava:14.0.1'
force 'com.google.guava:guava-gwt:14.0.1'
}
}
Kotlin Script:
configurations.all {
resolutionStrategy {
force("com.google.guava:guava:14.0.1")
force("com.google.guava:guava-gwt:14.0.1")
}
}
configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.google.guava') {
details.useVersion "14.0.1"
}
}
}
dependencies {
compile 'com.google.guava:guava'
compile 'com.google.guava:guava-gwt'
}