Skip to content
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

Dependency resolution differs in 6.8.3 and 7.0 #16706

Closed
gavra0 opened this issue Apr 2, 2021 · 2 comments
Closed

Dependency resolution differs in 6.8.3 and 7.0 #16706

gavra0 opened this issue Apr 2, 2021 · 2 comments
Labels

Comments

@gavra0
Copy link
Contributor

gavra0 commented Apr 2, 2021

Using project_sub.zip project and running gw :app:assembleDAT passes with 6.8.3 and fails with 7.0-rc-1.

Running gw :app:dependencyInsight --configuration debugAndroidTestCompileClasspath --dependency androidx.arch.core:core-runtime with Gradle 6.8.3, the project(":core-runtime") is used because

- By constraint : debugAndroidTestRuntimeClasspath uses version 2.1.0
- By conflict resolution : between versions 2.2.0 and 2.1.0

i.e 6.8.3 is able to apply both constraints when resolving the androidTest compile classpath, and it chooses the higher version (project).

However, in 7.0-rc-1 this fails with

          - Cannot find a version of 'androidx.arch.core:core-runtime' that satisfies the version constraints:
               Dependency path 'ProjectSubTest:app:unspecified' --> 'androidx.arch.core:core-runtime:2.1.0'
               Constraint path 'ProjectSubTest:app:unspecified' --> 'androidx.arch.core:core-runtime:{strictly 2.1.0}' because of the following reason: debugAndroidTestRuntimeClasspath uses version 2.1.0
               Dependency path 'ProjectSubTest:app:unspecified' --> 'project :core-runtime'

While 7.0-rc-1 behavior looks good (strict constrains should really be strict), I want to make sure that this change is intentional and documented in the release notes.

@melix
Copy link
Contributor

melix commented Apr 8, 2021

I'm going to take a look into this now, but I don't remember any intentional change in 7.0 in terms of dependency management in this area. It might be a side effect of removal of some configurations.

@melix
Copy link
Contributor

melix commented Apr 9, 2021

So the new behavior definitely seems correct, but I'm having hard times figuring out what caused the old behavior to be fixed. This seems to be specific to project substitutions.

@big-guy big-guy closed this as completed in aa2f47c Apr 9, 2021
@donat donat removed the to-triage label Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants