Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com>
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 42b4bcfd41f109b9b2c040de5151b094bd7bf5a0
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu Sep 29 22:27:09 2022
Re-work constraints on lifecycle artifacts
To fix a duplicate class error we were seeing
when multiple dependencies were added, we needed
to edit a typo shown in multiple constraints and
separate out the compose to non-compose constraints,
since they are less straight forward.
RelNote: "Fixes bug that caused a duplicate class
error when adding multiple lifecycle dependencies."
Test: tested in sample app
Bug: 249686765
Change-Id: I18d0dcbbc1fb2261108ccc700a439d932693870d
M lifecycle/lifecycle-runtime-compose/build.gradle
M settings.gradle
M lifecycle/lifecycle-runtime/build.gradle
M lifecycle/lifecycle-viewmodel/build.gradle
M lifecycle/lifecycle-livedata-core/build.gradle
M lifecycle/lifecycle-livedata-core-ktx/build.gradle
M lifecycle/lifecycle-viewmodel-savedstate/build.gradle
M lifecycle/lifecycle-livedata/build.gradle
M lifecycle/lifecycle-viewmodel-compose/build.gradle
M lifecycle/lifecycle-viewmodel-ktx/build.gradle
https://android-review.googlesource.com/2237306
Branch: androidx-main
commit 42b4bcfd41f109b9b2c040de5151b094bd7bf5a0
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu Sep 29 22:27:09 2022
Re-work constraints on lifecycle artifacts
To fix a duplicate class error we were seeing
when multiple dependencies were added, we needed
to edit a typo shown in multiple constraints and
separate out the compose to non-compose constraints,
since they are less straight forward.
RelNote: "Fixes bug that caused a duplicate class
error when adding multiple lifecycle dependencies."
Test: tested in sample app
Bug: 249686765
Change-Id: I18d0dcbbc1fb2261108ccc700a439d932693870d
M lifecycle/lifecycle-runtime-compose/build.gradle
M settings.gradle
M lifecycle/lifecycle-runtime/build.gradle
M lifecycle/lifecycle-viewmodel/build.gradle
M lifecycle/lifecycle-livedata-core/build.gradle
M lifecycle/lifecycle-livedata-core-ktx/build.gradle
M lifecycle/lifecycle-viewmodel-savedstate/build.gradle
M lifecycle/lifecycle-livedata/build.gradle
M lifecycle/lifecycle-viewmodel-compose/build.gradle
M lifecycle/lifecycle-viewmodel-ktx/build.gradle
il...@google.com <il...@google.com> #3
This has been fixed and will be available in Lifecycle 2.6.0-alpha03.
na...@google.com <na...@google.com> #4
The following release(s) address this bug:
androidx.lifecycle:lifecycle-livedata:2.6.0-alpha03
androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.0-alpha03
androidx.lifecycle:lifecycle-runtime:2.6.0-alpha03
androidx.lifecycle:lifecycle-runtime-compose:2.6.0-alpha03
androidx.lifecycle:lifecycle-viewmodel:2.6.0-alpha03
androidx.lifecycle:lifecycle-viewmodel-compose:2.6.0-alpha03
androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.0-alpha03
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.0-alpha03
Description
Component used:lifecycle-viewmodel
Version used: 2.6.0-alpha02
In this bug , version constraints were introduced in lifecycle dependencies to help reduce the likelihood of having conflicting lifecycle versions on the classpath.
It appears however, that the constraints in the latest version of
lifecycle-viewmodel
itself introduces a version conflict.Running the gradle
dependencies
command on a module containing it yields the following:In this line
lifecycle-viewmodel-ktx
has a version constraint to 2.3.1.The result is, in any project with the following lines added to their app dependencies:
Will see the following build failure: