Slackbot
06/12/2023, 10:36 AMVampire
06/12/2023, 10:45 AMEsa Firman
06/12/2023, 10:52 AMEsa Firman
06/12/2023, 10:59 AM> Could not resolve all task dependencies for configuration ':home:debugUnitTestRuntimeClasspath'.
Could not resolve <http://foo.bar.xyz:mymodule:1.0.0|foo.bar.xyz:mymodule:1.0.0>.
Required by:
project :home-page
project :home-page > project :bom
project :home-page > <http://foo.bar.xyz:feature-module:1.0.0|foo.bar.xyz:feature-module:1.0.0>
> Cannot find a version of '<http://foo.bar.xyz:mymodule|foo.bar.xyz:mymodule>' that satisfies the version constraints:
Dependency path 'home:unspecified' --> 'home:unspecified' (debugRuntimeElements) --> '<http://foo.bar.xyz:mymodule:1.0.0|foo.bar.xyz:mymodule:1.0.0>'
Dependency path 'home:unspecified' --> 'home:unspecified' (debugRuntimeElements) --> 'bom:unspecified' (runtimeElements) --> '<http://foo.bar.xyz:mymodule:1.0.0|foo.bar.xyz:mymodule:1.0.0>'
Constraint path 'home:unspecified' --> 'home:unspecified' (debugRuntimeElements) --> 'bom:unspecified' (runtimeElements) --> '<http://foo.bar.xyz:mymodule:{strictly|foo.bar.xyz:mymodule:{strictly> 1.0.0}' because of the following reason: Strictly enforced by bom. Please check with the team if there's an issue
Dependency path 'home:unspecified' --> 'home:unspecified' (debugRuntimeElements) --> '<http://foo.bar.xyz:home-contracts:1.0.0|foo.bar.xyz:home-contracts:1.0.0>' (runtime) --> '<http://foo.bar.xyz:mymodule:1.0.2|foo.bar.xyz:mymodule:1.0.2>'
I’m trying to resolve debugUnitTestRuntimeClasspath
configuration while the constraint in runtime
and runtimeElements
(?)Vampire
06/12/2023, 11:02 AM--scan
?Esa Firman
06/12/2023, 11:08 AMVampire
06/12/2023, 11:10 AMEsa Firman
06/12/2023, 11:44 AMVampire
06/12/2023, 11:53 AMstrictly
in the output.
Do you by any chance use the Spring dependency-management Gradle plugin?
Because that one can easily lead to such strange resolution problems and shouldn't be used either way. Even its developer says so. 🙂Esa Firman
06/12/2023, 11:58 AMHm, seems a bit strange as there is only oneJust to confirm, so normally above error will happen if there’s a conflict between constraints right?in the output.strictly
Do you by any chance use the Spring dependency-management Gradle plugin?I’m not, it’s an Android project 😅 , nice info anyway So should I raise an issue in Gradle repo? FYI It’s fixed for now, will try to compare the build scans tomorrow
Vampire
06/12/2023, 12:16 PMJust to confirm, so normally above error will happen if there’s a conflict between constraints right?Yeah, those errors for example happen if two different version are required "strictly" as this cannot be resolved then for example.
So should I raise an issue in Gradle repo?I guess the first step would be to knit an MCVE, otherwise it will also be hard for the Gradle guys to say or do anything. Once you have one, you could also first share it and and a build
--scan
of it here, so someone might give an advice,
or you can open an issues on the Gradle repo if you are sure it is actually a Gradle bug. 🙂Esa Firman
06/12/2023, 12:35 PMEsa Firman
09/08/2023, 11:16 AMdebugUnitTestRuntimeClasspath
and we resolved this issue by adding our platform project to testImplementation
configuration.
I still cannot explain why this happens, even the Gradle team in our support ticket still remains puzzled. It might be Android Android-specific issue, or it might also specific to our setup only (because we have a custom project and artifact-swapping plugin).
Once again, thanks @Vampire