Gradle plugin for JVM projects written in Java, Kotlin, Groovy, or Scala; and Android projects written in Java or Kotlin. Provides advice for managing dependencies and other applied plugins
Apache License 2.0
1.82k
stars
120
forks
source link
Guava checks ignore dependencies resolution that may bump guava to higher version #1307
(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version
2.0.21
(Optional) Android Gradle Plugin (AGP) version
8.7.2.
Describe the bug
I cannot even configure project with latest version which include guava version check.
Plugin says:
The Dependency Analysis Gradle Plugin requires Guava 33.1.0 or higher. Your build is using Guava 32.1.3-jre,
which is too low. Please update your dependencies.
Guava was loaded in the classloader named
ClassLoaderScopeIdentifier.Id{coreAndPlugins:settings[:](export)}
But when I print deps to understand from where I got wrong guava version I saw this:
To Reproduce
Idk minimal example, but my project looks similar to this
composite build with two modules:
1.1 . build-logic-settings -> :build-logic-settings:build-cache -> implementation("androidx.build.gradle.gcpbuildcache:androidx.build.gradle.gcpbuildcache.gradle.plugin:1.0.0")
1.2 build-logic -> :build-logic:plugins -> implementation("com.autonomousapps:dependency-analysis-gradle-plugin:2.4.2")
1.3 try to bump guava here to at least 33.1.0 like implementation("com.google.guava:guava:33.1.0-jre")
Try to sync
You should get the same error
I found the only way to fix - to add implementation("com.google.guava:guava:33.1.0-jre") before lib that require guava. But it's even another composite project, it seems irrational, but my be I'm wrong
Plugin version 2.4.2
Gradle version 8.11
JDK version 17
(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version 2.0.21
(Optional) Android Gradle Plugin (AGP) version 8.7.2.
Describe the bug I cannot even configure project with latest version which include guava version check. Plugin says:
But when I print deps to understand from where I got wrong guava version I saw this:
To Reproduce Idk minimal example, but my project looks similar to this
implementation("com.google.guava:guava:33.1.0-jre")
I found the only way to fix - to add
implementation("com.google.guava:guava:33.1.0-jre")
before lib that require guava. But it's even another composite project, it seems irrational, but my be I'm wrongExpected behavior DAGP do not fails fast