New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7.6.1 breaks gradle-consistent-versions #24234
Labels
Milestone
Comments
@CRogers thanks for the detailed report. We'll take a look |
@jvandort I can confirm it: |
FWIW I also tested against that commit and the parent commit and can confirm it's specifically that which fixes it:
|
Resolved with #25166 |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
gradle-consistent-versions
is one of our most essential gradle plugins used by 1000s of repos internally at our company.One half of the plugin takes a
versions.props
file (example) and applies these constraints to all configurations in all projects. The expectation is that if you add a constraint to thisversions.props
, it will end up in all your configurations (that it makes sense to apply constraints automatically to).I have a made a minimal reproducer repository to demonstrate this. It has a project with two configurations that are resolved sequentially by a task, pulling in the constraints from
versions.props
using gradle-consistent-versions:With Gradle 7.6, if you run
./gradlew resolveBoth
both configurations manage to resolve as they both have the constraints loaded fromversions.props
. See this buildscan when running with Gradle 7.6:Current Behavior
With Gradle 7.6.1, this same code does not manage to resolve the second configuration (or any configuration after the first). See this buildscan when running with Gradle 7.6.1:
Unfortunately, this causes every repo using gradle-consistent-versions (which is 99% of our repos) to not work with Gradle 7.6.1 (and by extension 8.0.2).
Context
Regressed commit in Gradle
I ran a git bisect between
v7.6.0
andv7.6.1
and found this to be the commit that causes the regression:Buildscans before and at this commit:
gradle-consistent-versions Internals Context
gradle-consistent-versions achieves this constraint propagation by creating a "platform" configuration of dependency constraints in the root project. Another root project configuration
rootConfiguration
then adds the constraints from the "platform" configuration using a project dependency. (Pretty much) all other configurations extendsFrom thisrootConfiguration
to ensure they get all the constraints.You'll notice the regressed 7.6.1 scan is missing the reference to the root project constraint "platform" the successful build using 7.6 had:
Steps to Reproduce
Run
./gradle resolveBoth
on CRogers/gradle-7.6.1-gcv-repro@b66a044. The previous commit uses 7.6 and works.Additionally gradle-consistent-versions has a branch showing it's tests succeeding with 7.6 and failing with 7.6.1.
Your Environment
Build scan URLs:
The text was updated successfully, but these errors were encountered: