[Dependency Updates] Update androidxLifecycleVersion to 2.5.1#17643
Conversation
It is generally recommended that transitively used dependencies should be declared directly.
It is generally recommended that transitively used dependencies should be declared directly.
It is generally recommended that transitively used dependencies should be declared directly.
Release Notes: https://developer.android.com/jetpack/androidx/releases/ lifecycle#2.5.1 ------------------------------------------------------------------------ Note that the 'androidxComposeLifecycleVersion' version got also updated to '2.5.1' since it is currently on the same versioning track as 'androidxLifecycleVersion' itself. Lifeycle Artifacts: https://developer.android.com/jetpack/androidx/ releases/lifecycle ------------------------------------------------------------------------ As part of this update the '-Xjvm-default=all' Kotlin related free compiler argument was added because otherwise the 'StatsViewAllViewModelFactory' class was failing to compile due to the below error: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Task :WordPress:compileWordpressWasabiDebugKotlin FAILED e: /Users/.../WordPress-Android/WordPress/src/main/java/org/wordpress /android/ui/stats/refresh/StatsViewAllViewModelFactory.kt: (64, 7): Inheritance from an interface with '@JvmDefault' members is only allowed with -Xjvm-default option - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - For more info see: - Kotlin Blog: https://blog.jetbrains.com/kotlin/2020/07/ kotlin-1-4-m3-generating-default-methods-in-interfaces/ - Google Issue Tracker: https://issuetracker.google.com/issues/217593040 - Stack Overflow Answer (Ian Lake): https://stackoverflow.com/questions/ 70992947/how-do-i-resolve-error-message-inheritance-from-an-interface- with-jvmdefault ------------------------------------------------------------------------ Also, as part of this change, the below 'kotlinx.coroutines.test' related imports had to be explicitly added, otherwise the corresponding tests were failing to compile as those imports are now seen as missing: - kotlinx.coroutines.test.advanceUntilIdle - kotlinx.coroutines.test.advanceTimeBy - kotlinx.coroutines.test.pauseDispatcher - kotlinx.coroutines.test.resumeDispatcher PS: 3/4 of the above imports are now deprecated as well. As such, those need to be updated accordingly. This is going to be done in subsequent commits. Below are the deprecated imports: - kotlinx.coroutines.test.advanceTimeBy - kotlinx.coroutines.test.pauseDispatcher - kotlinx.coroutines.test.resumeDispatcher In addition to that, lots of other 'kotlinx.coroutines.test' imports got deprecated as well, like 'TestCoroutineDispatcher', 'TestCoroutineScope', 'runBlockingTest', etc. All those need to be dealt with as well. This probably happened due to a transitive dependency update on 'kotlinx.coroutines', which bumped Coroutines to 1.6.1 for the whole project, that is, as part of the 'androidx.lifecycle' update to '2.5.1'. For example see some results below from running this dependencies './gradlew WordPress:dependencies' task: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - androidx.lifecycle:lifecycle-runtime-ktx:2.5.1 +--- androidx.annotation:annotation:1.0.0 -> 1.2.0 +--- androidx.lifecycle:lifecycle-runtime:2.5.1 (*) +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (*) \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1 (*) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - androidx.lifecycle:lifecycle-livedata-ktx:2.5.1 +--- androidx.lifecycle:lifecycle-livedata:2.5.1 (*) +--- androidx.lifecycle:lifecycle-livedata-core-ktx:2.5.1 (*) +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (*) \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1 (*) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1 -> 2.5.1 +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*) +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (*) \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1 (*) ------------------------------------------------------------------------
|
|||||||||||
| 💡 Scan this QR code with your Android phone to download and install the APK directly on it. | ||
| App | WordPress | |
| Build Flavor | Jalapeno | |
| Build Type | Debug | |
| Commit | fec2420 | |
|
|||||||||||
| 💡 Scan this QR code with your Android phone to download and install the APK directly on it. | ||
| App | Jetpack | |
| Build Flavor | Jalapeno | |
| Build Type | Debug | |
| Commit | fec2420 | |
…mobile/WordPress-Android into deps/update-androidx-lifecycle-to-2.5.1 � Conflicts: � WordPress/src/test/java/org/wordpress/android/MainCoroutineScopeRule.kt � WordPress/src/test/java/org/wordpress/android/ui/jetpack/scan/ScanViewModelTest.kt � WordPress/src/test/java/org/wordpress/android/ui/reader/discover/interests/ReaderInterestsViewModelTest.kt � WordPress/src/test/java/org/wordpress/android/ui/reader/repository/ReaderDiscoverDataProviderTest.kt � WordPress/src/test/java/org/wordpress/android/util/SnackbarSequencerConcurrentTest.kt
|
Found 1 violations: The PR caused the following dependency changes: +--- project :libs:analytics
| +--- com.automattic:Automattic-Tracks-Android:2.2.0
| | \--- io.sentry:sentry-android -> 5.4.3
| | \--- io.sentry:sentry-android-core:5.4.3
-| | +--- androidx.lifecycle:lifecycle-process:2.2.0 -> 2.4.1
-| | | +--- androidx.lifecycle:lifecycle-runtime:2.4.1
-| | | | +--- androidx.arch.core:core-runtime:2.1.0
-| | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | | | \--- androidx.arch.core:core-common:2.1.0
-| | | | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | | +--- androidx.lifecycle:lifecycle-common:2.4.1
-| | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | | | \--- androidx.lifecycle:lifecycle-common-java8:2.4.1 (c)
-| | | | +--- androidx.arch.core:core-common:2.1.0 (*)
-| | | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | +--- androidx.startup:startup-runtime:1.1.1
-| | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | | \--- androidx.tracing:tracing:1.0.0
-| | | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | \--- androidx.annotation:annotation:1.2.0
+| | +--- androidx.lifecycle:lifecycle-process:2.2.0 -> 2.5.1
+| | | +--- androidx.annotation:annotation:1.2.0
+| | | +--- androidx.lifecycle:lifecycle-runtime:2.5.1
+| | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | | +--- androidx.arch.core:core-common:2.1.0
+| | | | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | | +--- androidx.arch.core:core-runtime:2.1.0
+| | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | | | \--- androidx.arch.core:core-common:2.1.0 (*)
+| | | | \--- androidx.lifecycle:lifecycle-common:2.5.1
+| | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | | \--- androidx.lifecycle:lifecycle-common-java8:2.5.1 (c)
+| | | \--- androidx.startup:startup-runtime:1.1.1
+| | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | \--- androidx.tracing:tracing:1.0.0
+| | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | +--- androidx.lifecycle:lifecycle-common-java8:2.2.0 -> 2.4.1
-| | | +--- androidx.lifecycle:lifecycle-common:2.4.1 (*)
-| | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | +--- androidx.lifecycle:lifecycle-common-java8:2.2.0 -> 2.5.1
+| | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | \--- androidx.lifecycle:lifecycle-common:2.5.1 (*)
| | \--- androidx.core:core:1.3.2 -> 1.7.0
-| | \--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.4.1 (*)
+| | \--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.5.1 (*)
| \--- androidx.preference:preference:1.1.0
| \--- androidx.appcompat:appcompat:1.1.0 -> 1.3.1
| +--- androidx.activity:activity:1.2.4 -> 1.3.1
-| | +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.4.1 (*)
+| | +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.5.1 (*)
-| | +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.4.1
-| | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
+| | +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.5.1
+| | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (*)
+| | | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1 (c)
-| | +--- androidx.savedstate:savedstate:1.1.0
-| | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | +--- androidx.arch.core:core-common:2.0.1 -> 2.1.0 (*)
-| | | \--- androidx.lifecycle:lifecycle-common:2.0.0 -> 2.4.1 (*)
+| | +--- androidx.savedstate:savedstate:1.1.0 -> 1.2.0
+| | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | +--- androidx.arch.core:core-common:2.1.0 (*)
+| | | +--- androidx.lifecycle:lifecycle-common:2.4.0 -> 2.5.1 (*)
+| | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.20 -> 1.6.21 (*)
-| | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1
-| | +--- androidx.annotation:annotation:1.0.0 -> 1.2.0
-| | +--- androidx.savedstate:savedstate:1.1.0 (*)
-| | +--- androidx.lifecycle:lifecycle-livedata-core:2.3.1 -> 2.4.1
-| | | +--- androidx.arch.core:core-common:2.1.0 (*)
-| | | +--- androidx.arch.core:core-runtime:2.1.0 (*)
-| | | \--- androidx.lifecycle:lifecycle-common:2.4.1 (*)
-| | \--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.4.1 (*)
+| | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 -> 2.5.1
+| | +--- androidx.annotation:annotation:1.0.0 -> 1.2.0
+| | +--- androidx.core:core-ktx:1.2.0 -> 1.7.0
+| | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.21 (*)
+| | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+| | | \--- androidx.core:core:1.7.0 (*)
+| | +--- androidx.lifecycle:lifecycle-livedata-core:2.5.1
+| | | +--- androidx.arch.core:core-common:2.1.0 (*)
+| | | +--- androidx.arch.core:core-runtime:2.1.0 (*)
+| | | \--- androidx.lifecycle:lifecycle-common:2.5.1 (*)
+| | +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*)
+| | +--- androidx.savedstate:savedstate:1.2.0 (*)
+| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (*)
+| | \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1 -> 1.6.4
+| | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4
+| | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4
+| | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4
+| | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 (c)
+| | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4 (c)
+| | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 (c)
+| | | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 (*)
+| | | \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21
+| | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4 (*)
+| | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 (*)
| +--- androidx.fragment:fragment:1.3.6 -> 1.4.1
-| | +--- androidx.core:core-ktx:1.2.0 -> 1.7.0
-| | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.21 (*)
-| | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
-| | | \--- androidx.core:core:1.7.0 (*)
+| | +--- androidx.core:core-ktx:1.2.0 -> 1.7.0 (*)
| | +--- androidx.loader:loader:1.0.0
-| | | +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.4.1
-| | | | +--- androidx.arch.core:core-common:2.1.0 (*)
-| | | | +--- androidx.arch.core:core-runtime:2.1.0 (*)
-| | | | \--- androidx.lifecycle:lifecycle-livedata-core:2.4.1 (*)
+| | | +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.5.1
+| | | | +--- androidx.arch.core:core-common:2.1.0 (*)
+| | | | +--- androidx.arch.core:core-runtime:2.1.0 (*)
+| | | | \--- androidx.lifecycle:lifecycle-livedata-core:2.5.1 (*)
-| | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 -> 2.4.1 (*)
+| | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 -> 2.5.1 (*)
-| | +--- androidx.lifecycle:lifecycle-livedata-core:2.3.1 -> 2.4.1 (*)
+| | +--- androidx.lifecycle:lifecycle-livedata-core:2.3.1 -> 2.5.1 (*)
-| | +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.4.1 (*)
+| | +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.5.1 (*)
-| | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 (*)
+| | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 -> 2.5.1 (*)
-| | \--- androidx.savedstate:savedstate:1.1.0 (*)
+| | \--- androidx.savedstate:savedstate:1.1.0 -> 1.2.0 (*)
-| +--- androidx.savedstate:savedstate:1.1.0 (*)
+| +--- androidx.savedstate:savedstate:1.1.0 -> 1.2.0 (*)
-| +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.4.1 (*)
+| +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.5.1 (*)
-| \--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.4.1 (*)
+| \--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.5.1 (*)
+--- project :libs:image-editor
| +--- com.google.android.material:material:1.2.1 -> 1.6.0-alpha01
-| | \--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.4.1 (*)
+| | \--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.5.1 (*)
| +--- androidx.navigation:navigation-fragment:2.4.2
| | +--- androidx.fragment:fragment-ktx:1.4.1
| | | +--- androidx.activity:activity-ktx:1.2.3 -> 1.3.1
-| | | | +--- androidx.lifecycle:lifecycle-runtime-ktx:2.3.1 -> 2.4.1
-| | | | | +--- androidx.lifecycle:lifecycle-runtime:2.4.1 (*)
-| | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
-| | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0 -> 1.6.4
-| | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4
-| | | | | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4
-| | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4
-| | | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 (c)
-| | | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4 (c)
-| | | | | | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 (c)
-| | | | | | | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 (*)
-| | | | | | | \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21
-| | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4 (*)
-| | | | | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 (*)
-| | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.2.0
+| | | | +--- androidx.lifecycle:lifecycle-runtime-ktx:2.3.1 -> 2.5.1
+| | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.2.0
+| | | | | +--- androidx.lifecycle:lifecycle-runtime:2.5.1 (*)
+| | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (*)
+| | | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1 -> 1.6.4 (*)
-| | | | +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1 -> 2.4.1
-| | | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.4.1 (*)
-| | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
-| | | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0 -> 1.6.4 (*)
+| | | | +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1 -> 2.5.1
+| | | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*)
+| | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (*)
+| | | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1 -> 1.6.4 (*)
| | | | \--- androidx.savedstate:savedstate-ktx:1.1.0
-| | | | \--- androidx.savedstate:savedstate:1.1.0 (*)
+| | | | \--- androidx.savedstate:savedstate:1.1.0 -> 1.2.0 (*)
-| | | +--- androidx.lifecycle:lifecycle-livedata-core-ktx:2.3.1 -> 2.4.1
-| | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.4.1 (*)
-| | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
+| | | +--- androidx.lifecycle:lifecycle-livedata-core-ktx:2.3.1 -> 2.5.1
+| | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.5.1 (*)
+| | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (*)
-| | | \--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1 -> 2.4.1 (*)
+| | | \--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1 -> 2.5.1 (*)
| | \--- androidx.navigation:navigation-runtime:2.4.2
| | +--- androidx.navigation:navigation-common:2.4.2
-| | | +--- androidx.lifecycle:lifecycle-runtime-ktx:2.3.1 -> 2.4.1 (*)
+| | | +--- androidx.lifecycle:lifecycle-runtime-ktx:2.3.1 -> 2.5.1 (*)
-| | | +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1 -> 2.4.1 (*)
+| | | +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1 -> 2.5.1 (*)
-| | | +--- androidx.savedstate:savedstate:1.0.0 -> 1.1.0 (*)
+| | | +--- androidx.savedstate:savedstate:1.0.0 -> 1.2.0 (*)
-| | | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 (*)
+| | | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 -> 2.5.1 (*)
-| | +--- androidx.lifecycle:lifecycle-runtime-ktx:2.3.1 -> 2.4.1 (*)
+| | +--- androidx.lifecycle:lifecycle-runtime-ktx:2.3.1 -> 2.5.1 (*)
-| | \--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1 -> 2.4.1 (*)
+| | \--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1 -> 2.5.1 (*)
+| +--- androidx.lifecycle:lifecycle-common:2.5.1 (*)
+| +--- androidx.lifecycle:lifecycle-runtime:2.5.1 (*)
-| +--- androidx.lifecycle:lifecycle-viewmodel:2.4.1 (*)
+| +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*)
-| \--- androidx.lifecycle:lifecycle-livedata-core:2.4.1 (*)
+| +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1 (*)
+| \--- androidx.lifecycle:lifecycle-livedata-core:2.5.1 (*)
-+--- org.wordpress:fluxc:{strictly trunk-35bc4b0194946cdef6aedf45be77e4f1d6dc6126} -> trunk-35bc4b0194946cdef6aedf45be77e4f1d6dc6126
-| \--- androidx.paging:paging-runtime:2.1.2
-| +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.4.1 (*)
-| \--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.4.1 (*)
-+--- org.wordpress:login:1.0.0
-| \--- com.google.dagger:dagger-android-support:2.42
-| +--- androidx.lifecycle:lifecycle-common:2.3.1 -> 2.4.1 (*)
-| +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.4.1 (*)
-| \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 (*)
-+--- com.automattic:about:1.0.0
-| +--- androidx.compose.ui:ui:1.0.5 -> 1.1.1
-| | +--- androidx.savedstate:savedstate:1.1.0 (*)
-| | +--- androidx.lifecycle:lifecycle-common-java8:2.3.0 -> 2.4.1 (*)
-| | +--- androidx.lifecycle:lifecycle-runtime:2.3.0 -> 2.4.1 (*)
-| | \--- androidx.lifecycle:lifecycle-viewmodel:2.3.0 -> 2.4.1 (*)
-| +--- androidx.compose.ui:ui-tooling:1.0.5
-| | \--- androidx.compose.material:material:1.0.5 -> 1.1.1
-| | +--- androidx.savedstate:savedstate:1.1.0 (*)
-| | +--- androidx.lifecycle:lifecycle-runtime:2.3.0 -> 2.4.1 (*)
-| | \--- androidx.lifecycle:lifecycle-viewmodel:2.3.0 -> 2.4.1 (*)
-| \--- androidx.navigation:navigation-compose:2.4.0-beta02
-| \--- androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0-rc01 -> 2.4.1
-| +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0 -> 2.4.1 (*)
-| +--- androidx.compose.runtime:runtime:1.0.1 -> 1.1.1 (*)
-| +--- androidx.compose.ui:ui:1.0.1 -> 1.1.1 (*)
-| \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
-+--- com.automattic:stories:2.0.0
-| +--- com.automattic.stories:photoeditor:2.0.0
-| | \--- androidx.camera:camera-core:1.0.0-alpha06
-| | +--- androidx.lifecycle:lifecycle-livedata:2.1.0 -> 2.4.1 (*)
-| | \--- androidx.lifecycle:lifecycle-common:2.1.0 -> 2.4.1 (*)
-| +--- androidx.lifecycle:lifecycle-common-java8:2.2.0 -> 2.4.1 (*)
-| +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0 -> 2.4.1 (*)
-| \--- androidx.lifecycle:lifecycle-livedata-ktx:2.2.0 -> 2.4.1
-| +--- androidx.lifecycle:lifecycle-livedata:2.4.1 (*)
-| +--- androidx.lifecycle:lifecycle-livedata-core-ktx:2.4.1 (*)
-| +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
-| \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0 -> 1.6.4 (*)
-+--- androidx.lifecycle:lifecycle-runtime-ktx:2.4.1 (*)
-+--- androidx.work:work-runtime:2.7.0
-| +--- androidx.lifecycle:lifecycle-livedata:2.1.0 -> 2.4.1 (*)
-| \--- androidx.lifecycle:lifecycle-service:2.1.0
-| \--- androidx.lifecycle:lifecycle-runtime:2.1.0 -> 2.4.1 (*)
-+--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1 (*)
-+--- androidx.lifecycle:lifecycle-livedata-ktx:2.4.1 (*)
-+--- androidx.lifecycle:lifecycle-process:2.4.1 (*)
-+--- androidx.compose.runtime:runtime-livedata:1.1.1
-| \--- androidx.lifecycle:lifecycle-livedata:2.2.0 -> 2.4.1 (*)
-+--- androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1 (*)
-+--- io.coil-kt:coil-compose:1.4.0
-| \--- io.coil-kt:coil:1.4.0
-| \--- io.coil-kt:coil-base:1.4.0
-| +--- androidx.lifecycle:lifecycle-common-java8:2.3.1 -> 2.4.1 (*)
-| \--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.4.1 (*)
-\--- com.google.dagger:hilt-android:2.42
- +--- androidx.lifecycle:lifecycle-common:2.3.1 -> 2.4.1 (*)
- +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.4.1 (*)
- +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 (*)
- \--- androidx.savedstate:savedstate:1.1.0 (*)
++--- project :libs:editor
+| +--- androidx.lifecycle:lifecycle-common:2.5.1 (*)
+| +--- androidx.lifecycle:lifecycle-runtime:2.5.1 (*)
+| \--- androidx.lifecycle:lifecycle-livedata-core:2.5.1 (*)
++--- org.wordpress:fluxc:{strictly trunk-35bc4b0194946cdef6aedf45be77e4f1d6dc6126} -> trunk-35bc4b0194946cdef6aedf45be77e4f1d6dc6126
+| \--- androidx.paging:paging-runtime:2.1.2
+| +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.5.1 (*)
+| \--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.5.1 (*)
++--- org.wordpress:login:1.0.0
+| \--- com.google.dagger:dagger-android-support:2.42
+| +--- androidx.lifecycle:lifecycle-common:2.3.1 -> 2.5.1 (*)
+| +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.5.1 (*)
+| \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 -> 2.5.1 (*)
++--- com.automattic:about:1.0.0
+| +--- androidx.compose.ui:ui:1.0.5 -> 1.1.1
+| | +--- androidx.savedstate:savedstate:1.1.0 -> 1.2.0 (*)
+| | +--- androidx.lifecycle:lifecycle-common-java8:2.3.0 -> 2.5.1 (*)
+| | +--- androidx.lifecycle:lifecycle-runtime:2.3.0 -> 2.5.1 (*)
+| | \--- androidx.lifecycle:lifecycle-viewmodel:2.3.0 -> 2.5.1 (*)
+| +--- androidx.compose.ui:ui-tooling:1.0.5
+| | \--- androidx.compose.material:material:1.0.5 -> 1.1.1
+| | +--- androidx.savedstate:savedstate:1.1.0 -> 1.2.0 (*)
+| | +--- androidx.lifecycle:lifecycle-runtime:2.3.0 -> 2.5.1 (*)
+| | \--- androidx.lifecycle:lifecycle-viewmodel:2.3.0 -> 2.5.1 (*)
+| \--- androidx.navigation:navigation-compose:2.4.0-beta02
+| \--- androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0-rc01 -> 2.5.1
+| +--- androidx.annotation:annotation-experimental:1.1.0
+| +--- androidx.compose.runtime:runtime:1.0.1 -> 1.1.1 (*)
+| +--- androidx.compose.ui:ui:1.0.1 -> 1.1.1 (*)
+| +--- androidx.lifecycle:lifecycle-common-java8:2.5.1 (*)
+| +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1 (*)
+| +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1 (*)
+| \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (*)
++--- com.automattic:stories:2.0.0
+| +--- com.automattic.stories:photoeditor:2.0.0
+| | \--- androidx.camera:camera-core:1.0.0-alpha06
+| | +--- androidx.lifecycle:lifecycle-livedata:2.1.0 -> 2.5.1 (*)
+| | \--- androidx.lifecycle:lifecycle-common:2.1.0 -> 2.5.1 (*)
+| +--- androidx.lifecycle:lifecycle-common-java8:2.2.0 -> 2.5.1 (*)
+| +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0 -> 2.5.1 (*)
+| \--- androidx.lifecycle:lifecycle-livedata-ktx:2.2.0 -> 2.5.1
+| +--- androidx.lifecycle:lifecycle-livedata:2.5.1 (*)
+| +--- androidx.lifecycle:lifecycle-livedata-core-ktx:2.5.1 (*)
+| +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (*)
+| \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1 -> 1.6.4 (*)
++--- androidx.lifecycle:lifecycle-common:2.5.1 (*)
++--- androidx.lifecycle:lifecycle-runtime:2.5.1 (*)
++--- androidx.lifecycle:lifecycle-runtime-ktx:2.5.1 (*)
++--- androidx.work:work-runtime:2.7.0
+| +--- androidx.lifecycle:lifecycle-livedata:2.1.0 -> 2.5.1 (*)
+| \--- androidx.lifecycle:lifecycle-service:2.1.0
+| \--- androidx.lifecycle:lifecycle-runtime:2.1.0 -> 2.5.1 (*)
++--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*)
++--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1 (*)
++--- androidx.lifecycle:lifecycle-livedata-core:2.5.1 (*)
++--- androidx.lifecycle:lifecycle-livedata:2.5.1 (*)
++--- androidx.lifecycle:lifecycle-livedata-ktx:2.5.1 (*)
++--- androidx.lifecycle:lifecycle-process:2.5.1 (*)
++--- androidx.compose.runtime:runtime-livedata:1.1.1
+| \--- androidx.lifecycle:lifecycle-livedata:2.2.0 -> 2.5.1 (*)
++--- androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1 (*)
++--- io.coil-kt:coil-compose:1.4.0
+| \--- io.coil-kt:coil:1.4.0
+| \--- io.coil-kt:coil-base:1.4.0
+| +--- androidx.lifecycle:lifecycle-common-java8:2.3.1 -> 2.5.1 (*)
+| \--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.5.1 (*)
+\--- com.google.dagger:hilt-android:2.42
+ +--- androidx.lifecycle:lifecycle-common:2.3.1 -> 2.5.1 (*)
+ +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.5.1 (*)
+ +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 -> 2.5.1 (*)
+ \--- androidx.savedstate:savedstate:1.1.0 -> 1.2.0 (*)
Please review and act accordingly
|
This failure is expected as the failure occurs because the
'pushNotificationsStatusUpdate' hasn't been configured during the test
setup phases.
For more details see 'NullPointerException' stacktrace below:
------------------------------------------------------------------------
source cannot be null
java.lang.NullPointerException: source cannot be null
at androidx.lifecycle.MediatorLiveData.addSource
(MediatorLiveData.java:87)
at org.wordpress.android.ui.reader.viewmodels.
ConversationNotificationsViewModel.init
(ConversationNotificationsViewModel.kt:145)
at org.wordpress.android.ui.reader.viewmodels.
ConversationNotificationsViewModel.start
(ConversationNotificationsViewModel.kt:72)
at org.wordpress.android.ui.reader.viewmodels.
ConversationNotificationsViewModelTest.setupObserversAndStart
(ConversationNotificationsViewModelTest.kt:202)
at org.wordpress.android.ui.reader.viewmodels.
ConversationNotificationsViewModelTest.follow ui state is DISABLED
on start(ConversationNotificationsViewModelTest.kt:62)
------------------------------------------------------------------------
PS: Still, it is a bit weird that this test failure only started to
occur after updating the AndroidX Lifecycle library to 2.5.1.
This failure is expected as the failure occurs because the
'preloadPostEvents' wasn't being configured during the test
setup phases. For more details see 'NullPointerException' stacktrace
below:
------------------------------------------------------------------------
source cannot be null
java.lang.NullPointerException: source cannot be null
at androidx.lifecycle.MediatorLiveData.addSource
(MediatorLiveData.java:87)
at org.wordpress.android.ui.reader.discover.
ReaderDiscoverViewModel.init(ReaderDiscoverViewModel.kt:162)
at org.wordpress.android.ui.reader.discover.
ReaderDiscoverViewModel.start(ReaderDiscoverViewModel.kt:109)
at org.wordpress.android.ui.reader.discover.
ReaderDiscoverViewModelTest.init(ReaderDiscoverViewModelTest
.kt:632)
at org.wordpress.android.ui.reader.discover.
ReaderDiscoverViewModelTest.initial uiState is loading
(ReaderDiscoverViewModelTest.kt:200)
------------------------------------------------------------------------
PS: Still, it is a bit weird that this test failure only started to
occur after updating the AndroidX Lifecycle library to 2.5.1.
irfano
left a comment
There was a problem hiding this comment.
The diff LGTM! Great job, @ParaskP7! 🚀
I didn't see any notable change on the release notes of 2.5.1. JP and WP passed my manual tests for basic features.
MediatorLiveData.addSource() now throws a NullPointerException when passed a null source instead of propagating the null source to observers.(Ibd0fb, b/123085232)
About your comment on failing tests: Your finding is correct, the reason must be the new null check on 2.5.1.
|
@ParaskP7, in Merge Instructions, there is an item "Merge PR to |
|
👋 @irfano !
Thank you for the review, testing and for looking into release notes, you are awesome! 🙇 ❤️ 🚀
Yes! And thank you for digging even deeper than that and sharing the exact code change, you rock! 🥇
This is my bad, you are right, this PR needs to be merged to |



Parent #17561
Batch Branch: deps/main-batch-androidx-core
🚫 Blocked By:
kotlinxCoroutinesVersionupdate to1.6.4(for more info see 0ead5d3)This PR updates
androidxLifecycleVersionto 2.5.1.Also, as part of this update the below transitive dependencies were added:
Image Editormodule (2d93639):androidx.lifecycle:lifecycle-commonandroidx.lifecycle:lifecycle-runtimeandroidx.lifecycle:lifecycle-viewmodel-savedstateEditormodule (482f47b):androidx.lifecycle:lifecycle-commonandroidx.lifecycle:lifecycle-runtimeandroidx.lifecycle:lifecycle-livedata-coreWordPressmodule (3cc47ab):androidx.lifecycle:lifecycle-commonandroidx.lifecycle:lifecycle-runtimeandroidx.lifecycle:lifecycle-viewmodelandroidx.lifecycle:lifecycle-livedata-coreandroidx.lifecycle:lifecycle-livedataFYI: @oguzkocer I am mentioning you here so that you are aware that progress on this dependency update, and as such, the whole #17558 parent issue is being paused as #17560 and its
kotlinxCoroutinesVersionupdate to1.6.4is now blocking.In addition to the dependency update commits, a couple of additional test related commits were added to fix a couple of failing tests suites, see below:
However, I am still not sure why those tests were passing when
AndroidX Lifecycleis on2.4.1, and only started failing after updating theAndroidX Lifecyclelibrary to2.5.1. They should have been failing with2.4.1as well. My assumption is that the update to2.5.1made the library a bit more strict in terms of testing, some bugs related to that got fixed, and thus, things that were previously falsely working are now failing unless the setup is concrete. 🤔UPDATE: I actually found why this started happening, and it is indeed a bug fix, which actually improves our testing. Thus, this is nothing concerning in terms of those tests starting failing due to a potential change that might be affecting our main sources. See 2.5.0-rc01 release notes (
Bug Fixes). Copy-pasted below for ease of reference:MediatorLiveData.addSource()now throws aNullPointerExceptionwhen passed anullsource instead ofpropagating the
nullsource to observers.(Ibd0fb, b/123085232)PS: @irfano I added you as the main reviewer, that is, in addition to the @wordpress-mobile/apps-infrastructure team itself, but randomly, since I just wanted someone from the WordPress team to be aware of and sign-off on that change for WPAndroid.
To test:
Merge instructions
kotlinxCoroutinesVersionupdate to1.6.4merged totrunk.deps/main-batch-androidx-corebranch with latesttrunk.deps/main-batch-androidx-core.[PR] Not Ready For Merge]label.Ready for reviewstate.deps/main-batch-androidx-core.Regression Notes
Potential unintended areas of impact
androidx.lifecycleis a library that is being added as a transitive dependency across lots ofandroidxandcom.googleandotherlibraries.What I did to test those areas of impact (or what existing automated tests I relied on)
To testsection above.What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txtif necessary.