Closed cpuzicha closed 6 months ago
It would appear that the plugin hasn't noticed that the dependency has been substituted. It's ensuring that its version is 1.70
due to this behaviour that's described in the documentation. It can be disabled:
dependencyManagement {
overriddenByDependencies(false)
}
It may be possible for the plugin to detect a substitution and adapt accordingly so that the above workaround isn't necessary.
The given example is just a condensed version - we can't don't want to globally disable overriddenByDependencies
Understood, hence me describing it as a workaround above, but I believe it's your only option until we know if it's possible for the plugin to give some special treatment to substituted dependencies. It'll depend on the information that Gradle's APIs make available to the plugin.
We have a local plugin-infrastructure that wants to replace BouncyCastle for JDK 1.5 with BouncyCastle for JDK 1.8 due to CVEs. However the Spring dependency management plugin for some reason triggers a download of the new module (bcprov-jdk18on) with the old version (1.7.0) - and fails.
The error shows up for the tasks
dependencies
,dependencyInsight
and everything compilation related, likeassemble
.build.gradle.kts
src/main/java/ForceCompile.java
Applying the substitution after the Spring plugin would work but should not make a difference and is not viable workaround for us.
build.gradle.kts - working version