multiplatform-paging
multiplatform-paging copied to clipboard
Contribute this to AndroidX?
This is great! Not sure yet if a PR back to AndroidX would be accepted but if it were to be, would you be interested in unforking this?
Thanks! Yes, I'd be very interested in upstreaming these changes up to AndroidX (partially or fully). For a quick breakdown of what that would involve:
- To upstream the
paging-commonchanges, our changes on theandroidx-mainbranch should be cherry-pickable back to upstream. - The additional iOS bindings provided in
paging-runtimeshould just be directly copy-able from its module.
If there is a possibility to upstream these changes back to AndroidX, I'd obviously be happy to help with the process of contributing it upstream. If there are any technical concerns about having it upstreamed, I'd also be happy to talk through them!
Thanks for the details and openness to contributing this back. I'll post here when/if this is something the team can take on.
For anyone following along, there's been talks with the AndroidX folks.
The immediate plan is to "Ensure paging-common is free of Android and JVM specific API usages" upstream (i.e., within AndroidX itself). With the completion of that ticket, this doesn't mean that the upstream paging-common artifact will be multiplatform. It just means that making upstream multiplatform will be easier in the future.
As a consumer of Multiplatform Paging, nothing much will change. The only benefit that I could see is that new versions of AndroidX Paging will be tracked here a bit faster, as the lower the the delta between upstream and my fork, the less work it is to track a new release.
After much collaboration with the AndroidX Paging team, AndroidX Paging now ships multiplatform artifacts! I'm very happy to see these changes upstream 😄
Where does this leave Multiplatform Paging? You'll (probably) still need it!
- AndroidX Paging supports a smaller set of targets than Multiplatform Paging.
- For
paging-common, if you need to support any one of JS, MinGW, Linux Arm64, tvOS, or watchOS, then you'll still need to use Multiplatform Paging. If you are just targeting JVM, iOS, Linux X64, or macOS, then you can use the officialandroidx.paging:paging-commonartifact. - For
paging-compose, if you need to support any target that isn't the JVM, then you'll still need to use Multiplatform Paging. If you are just targeting the JVM, then you can use the officialandroidx.paging:paging-composeartifact.
- For
- AndroidX Paging doesn't provide any integration components with platforms beyond Android. If you want to use AndroidX Paging on iOS, you'll probably want to use
paging-runtime-uikitfrom Multiplatform Paging, which provides aPagingDataAdapterequivalent to iOS.
Mixing and matching artifacts between AndroidX Paging and Multiplatform Paging is valid (as long as they are both on the same version, e.g., 3.3.0-alpha02 and 3.3.0-alpha02-0.4.0 respectively). Therefore, if you are happy with the targets that AndroidX Paging provides, but wish to use paging-runtime-uikit from Multiplatform Paging, then a valid set of dependencies could look like this:
implementation("androidx.paging:paging-common:3.3.0-alpha02")
implementation("app.cash.paging:paging-runtime-uikit:3.3.0-alpha02-0.4.0")