You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When several plugins request different incompatible versions of the same library, Gradle does not report this as an error. Instead the build fails with runtime a runtime error.
Expected Behavior
If several plugins depend on incompatible versions of the same library, Gradle should report this as an error.
Current Behavior
Gradle silently selects one version of the library which causes errors at build time.
In 9.x we plan to restrict all projects within a single build to have the same classpath.
This means in Gradle 9.x, we will deprecate using the buildscript block in any project other than the root project of a build, and will enforce all plugins to be apply false'd at the root-level if they are to be applied in any subproject.
@jvandort I don't think a single classpath across all projects will help in this situation. What this ticket is about, is a plugin dependency conflict that is not reported by Gradle. Instead the build just crashes at runtime. In my opinion the same mechanics as when resolving project dependencies should be applied to resolving plugin dependencies, so that a conflict is reported at configuration time, not at build runtime.
When several plugins request different incompatible versions of the same library, Gradle does not report this as an error. Instead the build fails with runtime a runtime error.
Expected Behavior
If several plugins depend on incompatible versions of the same library, Gradle should report this as an error.
Current Behavior
Gradle silently selects one version of the library which causes errors at build time.
Context
This was reported as britter/maven-plugin-development#65 but it turned out to be plugin classpath issue. The reporter applied maven-plugin-development plugin together with several other plugins that depend on the
com.thoughtworks.qdox:qdox
module. maven-plugin-development plugin depends oncom.thoughtworks.qdox:qdox:2.0-M5
and defines this as a constraint: https://github.com/britter/maven-plugin-development/blob/f710c414301386ef52b477a738119b148a866e87/subprojects/plugin/build.gradle.kts#L58-L62. Several other plugins depend oncom.thoughtworks.qdox:qdox:1.12.1
. See https://scans.gradle.com/s/6zdhoqgumbhcs/build-dependencies?dependencies=qdox&expandAll&focusedDependency=WzEsMCwxNTgsWzEsMCxbMV1dXQ&focusedDependencyView=versionsThe only way to fix this is removing conflicting plugins from the using build.
The only way to fix this in maven-plugin-development is to relocate all plugin dependencies.
Steps to Reproduce
See britter/maven-plugin-development#65 (comment)
Your Environment
Build scan URL: https://scans.gradle.com/s/6zdhoqgumbhcs
The text was updated successfully, but these errors were encountered: