Android Developers Blog
The latest Android and Google Play news for app and game developers.
🔍
Platform Android Studio Google Play Jetpack Kotlin Docs News

11 Nisan 2023

What's new in multiplatform Jetpack libraries


Link copied to clipboard
Posted by Márton Braun, Developer Relations Engineer

To support developers who are already using Kotlin Multiplatform for sharing business logic across mobile platforms, we previously released experimental multiplatform previews of the Collections and DataStore Jetpack libraries, and we've been receiving great feedback from the community.

The multiplatform Collections and DataStore libraries are now moving from experimental developer previews to alpha releases, and will follow the normal release cycle of Jetpack libraries. Annotations, a core Jetpack library, is now also available for multiplatform.

Please note that Kotlin Multiplatform is still in beta, therefore the non-Android targets of these libraries don’t have Jetpack’s usual stability guarantees.

The alpha releases are available from Google’s Maven repository. You can try them by adding the following dependencies to your Kotlin Multiplatform project:

val commonMain by getting {
    dependencies {
        implementation("androidx.annotation:annotation:1.7.0-alpha02")       

        implementation("androidx.collection:collection:1.3.0-alpha04")

        // Lower-level APIs with support for custom serialization
        implementation("androidx.datastore:datastore-core-okio:1.1.0-alpha03")
        // Higher-level APIs for storing values of basic types
        implementation("androidx.datastore:datastore-preferences-core:1.1.0-alpha03")
   }
}

The multiplatform DiceRoller sample app has also been updated to use the new alpha version of DataStore.

To provide feedback on these multiplatform releases, create a bug on our issue tracker, or join the conversation in the Kotlinlang #multiplatform channel.