I use the following two dependencies:
compile \'com.google.guava:guava:14.0.1\'
compile \'com.google.guava:guava-gwt:14.0.1\'
Both must be
Another option is to use dependency constraint: https://docs.gradle.org/current/userguide/dependency_constraints.html
dependencies {
implementation 'org.apache.httpcomponents:httpclient'
constraints {
implementation('org.apache.httpcomponents:httpclient:4.5.3') {
because 'previous versions have a bug impacting this application'
}
implementation('commons-codec:commons-codec:1.11') {
because 'version 1.9 pulled from httpclient has bugs affecting this application'
}
}
}
I had a similar situation where one of the dependencies used spring-web 4.2.4 which was broken. You have to force specific library version you want. As mentioned in another comment, it might cause compatibility issues but sometimes is necessary.
Least intrusive way of forcing a library version I found was instead of using
compile "org.springframework:spring-web:4.2.3.RELEASE"
specifying dependency configuration as forced:
compile("org.springframework:spring-web:4.2.3.RELEASE"){
force = true
}
I used it when I needed to downgrade Spring version temporarily (until next release).