Description
My Java project has a transitive dependency on com.google.guava:guava
.
I manually update the version of guava by adding a constraint to the dependencies section of my build.gradle
:
dependencies {
.....
constraints {
// update guava to latest
implementation("com.google.guava:guava:32.0.1-jre") {
because("cdk uses an old version")
}
}
}
When updating from version 32.0.1-jre
to version 32.1.1-jre
the following transitive dependencies of guava cannot be resolved:
> Could not find com.google.code.findbugs:jsr305:.
Required by:
project : > com.google.guava:guava:32.1.1-jre
> Could not find org.checkerframework:checker-qual:.
Required by:
project : > com.google.guava:guava:32.1.1-jre
> Could not find com.google.errorprone:error_prone_annotations:.
Required by:
project : > com.google.guava:guava:32.1.1-jre
> Could not find com.google.j2objc:j2objc-annotations:.
Required by:
project : > com.google.guava:guava:32.1.1-jre
I use the official maven repository to resolve dependencies:
repositories {
mavenCentral(name: 'official maven')
}
As there is no such issue of resolving these transitive dependencies when switching back to guava version 32.0.1-jre
even after manually deleting all directories that start with com.google
in the gradle cache the issue isn't caused by the libraries not being available from the repository.
I cannot (or don't know how to) redact information from the gradle build scan, so I opted for providing you with the console output of gradlew -info clean compileJava
.
Please let me know if there is anything else you need to look into this.