Fix Gradle 9.4.0 variant resolution failure with gradle-consistent-versions#149
Closed
Fix Gradle 9.4.0 variant resolution failure with gradle-consistent-versions#149
gradle-consistent-versions#149Conversation
Generate changelog in
|
✅ Successfully generated changelog entry!Need to regenerate?Simply interact with the changelog bot comment again to regenerate these entries. 📋Changelog Preview💡 Improvements
|
This was referenced Mar 10, 2026
Contributor
Author
|
closed in favour of palantir/gradle-consistent-versions#1614 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this PR
On Gradle 9.4.0 with
gradle-consistent-versions,compileClasspathresolution fails:GCV's
configureEachcallsconf.extendsFrom(rootConfiguration)on all configs. SincerootConfigurationhas aProjectDependencyon root, this creates a self-referencing cycle in the variant model for our consumable config on the root project. Introduced by gradle/gradle#36245 which madeextendsFromlazy.After this PR
Excludes our custom outgoing configuration from GCV's
configureEachusingVersionRecommendationsExtension.excludeConfigurations(). Our configurations use a customUsageattribute with no external module dependencies, so GCV's version constraints are irrelevant.Also bumps tested Gradle 9 version to 9.4.0 and adds a GCV compatibility test.
Superseded by #150 which fixes the architectural root cause instead.
Possible downsides?
Testing
compatible_with_consistent_versionstest