Skip to content

Upgrading androidx.paging:paging-runtime-ktx 2 to 3

Breaking2.1.2 → 3.5.3Breaking2Platform4New16Changed5Fixed13

Fetching 66 releases from AndroidX notes…22 / 66
BreakingUpgrade verdict

2 breaking changes and 4 platform requirement changes.

  • A function for turning a stream of paging data into a state-like stream has a new name, so code using the old name must be updated.
  • Builds that target the older 64-bit Apple simulator platforms will no longer work with these libraries.
  • These libraries now work on more platforms, including desktop Java, several Apple systems, Linux, Windows, and the web.
  • This version no longer supports building for the older 64-bit Intel Apple targets (macOS, iOS, watchOS, and tvOS). Projects targeting those platforms need to move to the newer Apple targets.
Top 5 of 6 that need code or config changes

Adds org.jetbrains.kotlin:kotlin-stdlib 2.1.20.

Installs 41 packages in all (was 32).

Also installs androidx.annotation:annotation-jvm, androidx.concurrent:concurrent-futures, androidx.core:core-ktx, androidx.core:core-viewtree, androidx.lifecycle:lifecycle-common-jvm, androidx.lifecycle:lifecycle-livedata-core-ktx, androidx.lifecycle:lifecycle-livedata-ktx, androidx.lifecycle:lifecycle-runtime-android, androidx.lifecycle:lifecycle-runtime-ktx, androidx.lifecycle:lifecycle-runtime-ktx-android, androidx.lifecycle:lifecycle-viewmodel, androidx.lifecycle:lifecycle-viewmodel-android, androidx.lifecycle:lifecycle-viewmodel-ktx, androidx.paging:paging-common-android, androidx.paging:paging-common-desktop and 8 more.

No longer installs androidx.asynclayoutinflater:asynclayoutinflater, androidx.coordinatorlayout:coordinatorlayout, androidx.cursoradapter:cursoradapter, androidx.documentfile:documentfile, androidx.drawerlayout:drawerlayout, androidx.interpolator:interpolator, androidx.legacy:legacy-support-core-ui, androidx.legacy:legacy-support-core-utils, androidx.loader:loader, androidx.localbroadcastmanager:localbroadcastmanager, androidx.print:print, androidx.slidingpanelayout:slidingpanelayout, androidx.swiperefreshlayout:swiperefreshlayout, androidx.viewpager:viewpager, org.jetbrains.kotlin:kotlin-stdlib-common.

Moves androidx.annotation:annotation 1.0.0 → 1.1.0, androidx.arch.core:core-common 2.0.0 → 2.2.0, androidx.arch.core:core-runtime 2.0.0 → 2.2.0, androidx.core:core 1.0.0 → 1.3.2, androidx.lifecycle:lifecycle-common 2.0.0 → 2.10.0, androidx.lifecycle:lifecycle-livedata 2.0.0 → 2.10.0, androidx.lifecycle:lifecycle-livedata-core 2.0.0 → 2.10.0, androidx.lifecycle:lifecycle-runtime 2.0.0 → 2.0.0, 2.10.0, androidx.recyclerview:recyclerview 1.0.0 → 1.2.1, androidx.versionedparcelable:versionedparcelable 1.0.0 → 1.1.0, org.jetbrains.kotlin:kotlin-stdlib 1.2.70 → 2.1.20. Your build may pick other versions.

3 packages of its own release move with it.

Breaking2
Renames the Flow<PagingData>.asState API to Flow<PagingData>.asItemSnapshotListFlow.
Flow<PagingData>.asStateFlow<PagingData>.asItemSnapshotListFlow
Removes support for macosX64, iosX64, watchosX64, and tvosX64 targets in paging-common, paging-testing, and paging-compose.
paging-commonpaging-testingpaging-composemacosX64iosX64watchosX64tvosX64
Platform4
Adds more KMP targets to paging-common, paging-testing, and paging-compose, now supporting JVM, Native, and Web targets.
paging-commonpaging-testingpaging-compose
Removes support for the KMP platforms macosX64, iosX64, watchosX64, and tvosX64 to align with JetBrains deprecation of macosX64 targets.
macosX64iosX64watchosX64tvosX64
Moves the default minSdk from API 21 to API 23.
Moves paging-compose code to common and ships an Android artifact, matching androidx.compose multiplatform support.
paging-compose