I substituted the com.github.mwiede
jsch fork in a build file to resolve jgit
issues.
buildscript {
dependencies {
classpath "pl.allegro.tech.build:axion-release-plugin:1.14.2"
}
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute module("com.jcraft:jsch") using module("com.github.mwiede:jsch:0.2.6") because "jcraft jsch has been unmaintained for years."
}
}
}
Through Gradle 8.2.1 it looks like it worked as expected:
$ ./gradlew wrapper --gradle-version 8.2.1
$ ./gradlew buildEnvironment | grep -i jsch
| +--- org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:5.13.1.202206130422-r |
| +--- com.jcraft:jsch:0.1.55 -> com.github.mwiede:jsch:0.2.13
| +--- com.jcraft:jsch:0.1.55 -> com.github.mwiede:jsch:0.2.13
however Gradle 8.3 seems to have stopped picking up the substitution:
$ ./gradlew wrapper --gradle-version 8.3
$ ./gradlew buildEnvironment | grep -i jsch
| +--- org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:5.13.1.202206130422-r |
| +--- com.jcraft:jsch:0.1.55
| +--- com.jcraft:jsch:0.1.55
The 8.2.1 ResolutionStrategy docs and the 8.3 ResolutionStrategy docs have differences between them but nothing breaking shown related to DependencySubstitutions. Maybe Gradle still picks up the substitution but just fails to show it in buildEnvironment
? Seems like a regression in Gradle 8.3?