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
I'm trying to upgrade from Gradle 7.6.4 to 8.11.1 and as part of that it appears as though I have to upgrade the gradle-dependency-lock-plugin which was on 9.4.1. The problem is that the newer versions all fail in the generateGlobalLock task with an error of
...
Caused by: org.gradle.api.internal.artifacts.ivyservice.TypedResolveException: Could not resolve all dependencies for configuration ':detachedConfiguration1'.
...
Caused by: org.gradle.internal.component.resolution.failure.exception.VariantSelectionByNameException: A dependency was declared on configuration 'aggregateConfiguration' of 'project :the:project-name' but no variant with that configuration name exists.
....
If I modify a local copy of the dependency-lock plugin by reverting this code with the following diff then everything works properly. I assume this change was originally done for a reason. Any chance you would consider adding an option to conditionally use the non-aggregate way of collecting these dependencies?
Our build does have a custom resolution strategy defined via configurations {... all { resolutionStrategy { which is lost in that aggregate configuration (or more specifically: logging in that resolutionStrategy is never hit when using aggregate but is when using a direct dependency as it used to be pre-2021). Maybe that is related to the issue with the aggregateConfiguration?
I'm trying to upgrade from Gradle 7.6.4 to 8.11.1 and as part of that it appears as though I have to upgrade the gradle-dependency-lock-plugin which was on 9.4.1. The problem is that the newer versions all fail in the generateGlobalLock task with an error of
...
Caused by: org.gradle.api.internal.artifacts.ivyservice.TypedResolveException: Could not resolve all dependencies for configuration ':detachedConfiguration1'.
...
Caused by: org.gradle.internal.component.resolution.failure.exception.VariantSelectionByNameException: A dependency was declared on configuration 'aggregateConfiguration' of 'project :the:project-name' but no variant with that configuration name exists.
....
I tracked this down to a change that was made in DependencyLockTaskConfigurer.groovy in d482515#diff-baa5044cd9d9bfebb1f37a3a4ad6b512462b4fd94ac6400393c6671623287416
If I modify a local copy of the dependency-lock plugin by reverting this code with the following diff then everything works properly. I assume this change was originally done for a reason. Any chance you would consider adding an option to conditionally use the non-aggregate way of collecting these dependencies?
Our build does have a custom resolution strategy defined via configurations {... all { resolutionStrategy { which is lost in that aggregate configuration (or more specifically: logging in that resolutionStrategy is never hit when using aggregate but is when using a direct dependency as it used to be pre-2021). Maybe that is related to the issue with the aggregateConfiguration?
The text was updated successfully, but these errors were encountered: