I’m trying to add a configuration with a dependency on an earlier version of the current project in order to backwards compatibility testing. Whatever I do, the dependency ends up being resolved using the project itself.
Example code (not real):
build.gradle:
group = 'a.b'
version = '1.0.0'
name = 'c'
configurations {
testConfig
}
dependencies {
testConfig 'a.b:c:0.9.0'
}
but the output from “gradle -q dependencies --configuration testConfig” is:
+--- a.b:c:0.9.0 -> project : (*)
which of course is a.b:c:1.0.0. I’ve tried making the dependency ‘strictly’, forcing it, using dependency substitution rules to replace the project with the module, but nothing seems to make any difference.
Has anyone else seen this?
(Gradle 5.4, using the java-library plugin)