
Enables parcelable support across multiple platforms, facilitating seamless data serialization and deserialization. Offers custom annotation processing and supports complex data structures for efficient data transfer.
This library provides parcelize annotations that can be used inside commonMain source sets.
Following is provided inside the com.michaelflisar.parcelize package:
package com.michaelflisar.parcelize
expect interface Parcelable
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
expect annotation class Parcelize()
@Target(AnnotationTarget.PROPERTY)
@Retention(AnnotationRetention.SOURCE)
expect annotation class IgnoredOnParcel()
@Target(AnnotationTarget.TYPE)
@Retention(AnnotationRetention.BINARY)
expect annotation class RawValueThe actual implementations for android looks as following:
package com.michaelflisar.parcelize
actual typealias Parcelable = android.os.Parcelable
actual typealias Parcelize = kotlinx.parcelize.Parcelize
actual typealias IgnoredOnParcel = kotlinx.parcelize.IgnoredOnParcel
actual typealias RawValue = kotlinx.parcelize.RawValue| Module | android | iOS | windows | macOS | wasm | Notes |
|---|---|---|---|---|---|---|
| library | ✅ | ✅ | ✅ | ✅ | ✅ | This provides parcelize classes and annotations compatible with kmp multiplatform |
| Dependency | Version |
|---|---|
| Kotlin | 2.3.20 |
| Jetbrains Compose | 1.10.3 |
| Jetbrains Compose Material3 | 1.9.0 |
Define the dependencies inside your libs.versions.toml file.
[versions]
kmpparcelize = "<LATEST-VERSION>"
[libraries]
kmpparcelize-library = { module = "io.github.mflisar.kmpparcelize:library", version.ref = "kmpparcelize" }And then use the definitions in your projects build.gradle.kts file like following:
implementation(libs.kmpparcelize.library)Simply add the dependencies inside your build.gradle.kts file.
val kmpparcelize = "<LATEST-VERSION>"
implementation("io.github.mflisar.kmpparcelize:library:${kmpparcelize}")Simple use the provided annotations instead of the one from androidx and you are done.
Check out the API documentation.
You can find more libraries (all multiplatform) of mine that all do work together nicely here.
This library provides parcelize annotations that can be used inside commonMain source sets.
Following is provided inside the com.michaelflisar.parcelize package:
package com.michaelflisar.parcelize
expect interface Parcelable
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
expect annotation class Parcelize()
@Target(AnnotationTarget.PROPERTY)
@Retention(AnnotationRetention.SOURCE)
expect annotation class IgnoredOnParcel()
@Target(AnnotationTarget.TYPE)
@Retention(AnnotationRetention.BINARY)
expect annotation class RawValueThe actual implementations for android looks as following:
package com.michaelflisar.parcelize
actual typealias Parcelable = android.os.Parcelable
actual typealias Parcelize = kotlinx.parcelize.Parcelize
actual typealias IgnoredOnParcel = kotlinx.parcelize.IgnoredOnParcel
actual typealias RawValue = kotlinx.parcelize.RawValue| Module | android | iOS | windows | macOS | wasm | Notes |
|---|---|---|---|---|---|---|
| library | ✅ | ✅ | ✅ | ✅ | ✅ | This provides parcelize classes and annotations compatible with kmp multiplatform |
| Dependency | Version |
|---|---|
| Kotlin | 2.3.20 |
| Jetbrains Compose | 1.10.3 |
| Jetbrains Compose Material3 | 1.9.0 |
Define the dependencies inside your libs.versions.toml file.
[versions]
kmpparcelize = "<LATEST-VERSION>"
[libraries]
kmpparcelize-library = { module = "io.github.mflisar.kmpparcelize:library", version.ref = "kmpparcelize" }And then use the definitions in your projects build.gradle.kts file like following:
implementation(libs.kmpparcelize.library)Simply add the dependencies inside your build.gradle.kts file.
val kmpparcelize = "<LATEST-VERSION>"
implementation("io.github.mflisar.kmpparcelize:library:${kmpparcelize}")Simple use the provided annotations instead of the one from androidx and you are done.
Check out the API documentation.
You can find more libraries (all multiplatform) of mine that all do work together nicely here.