Status Update
Comments
lb...@gmail.com <lb...@gmail.com> #2
The ToT dependency was coming from compose:test-utils
. Jeremy raised aosp/2254837 to pin this to a prebuilt.
Alternatively, we could have added explicit androidTestImplementation
dependencies on ToT to ensure it's available during dependency resolution.
TL;DR If we express a constraint on androidx.thing:thing:$TOT_VERSION
which maps to the tip-of-tree version for :thing:thing
, then any occurrence of androidx.thing:thing:$VERSION
where the constraint is present must also include :thing:thing
somewhere in the transitive dependencies.
da...@google.com <da...@google.com> #3
My understanding of this issue is:
-
Project A's library code depends on prebuilt B.
-
Project A's test depends on prebuilt B and also library C.
-
Library C declares a constraint saying that B must be the same version as Library C.
-
When resolving dependencies for Project A's tests, these tests depend on prebuilt B and library C, so library C's dependency information is also considered.
-
Library C says it requires B of the same version.
-
To reconcile:
- these requirements:
- the dependency on prebuilt B
- the constraint for B to match the version of C
- Gradle looks for a prebuilt of B with version matching C.
- these requirements:
-
No prebuilt of B exists with the same version matching Library C, so Gradle fails to resolve the dependency.
Is this right?
The request in
lb...@gmail.com <lb...@gmail.com> #4
No prebuilt of B exists with the same version matching the prebuilt of C, so Gradle fails to resolve the dependency.
Just to make sure we're aligned, this should read "library C" rather than prebuilt? It's library C (e.g. project(C)
with version $X
) that expresses a constraint on prebuilt B at version $X
.
Assuming we're aligned...
Yes however if library B (e.g. project("B")
) exists in the set of dependencies and its version matches C, then Gradle will successfully resolve the dependency by "upgrading" prebuilt B to library B.
Description
Version used:
def room_version = '2.6.0-rc01'
implementation "androidx.room:room-runtime:$room_version"
ksp "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"
Devices/Android versions reproduced on:
IDE
The bug is that I tried to update from this:
def room_version = '2.6.0-beta01'
to this:
def room_version = '2.6.0-rc01'
And it caused build errors of this:
Execution failed for task ':app:kspDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Internal compiler error. See log for more details