Open Shabinder opened 1 year ago
Compilation works fine, latest Stable Intellij + Android Studio both show red error highlightning.
if you add moko-parcelize directly to module where you see this error - error fixes or not?
Nope.
I've also been running into this and its causing further problems because auto-updating of compose previews will not trigger.
just a heads up, kotlin 2.0 has official support for the functionality provided by this library.
targets.configureEach {
val isAndroidTarget = platformType == KotlinPlatformType.androidJvm
compilations.configureEach {
compileTaskProvider.configure {
compilerOptions {
freeCompilerArgs.addAll(
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-Xexpect-actual-classes", // used for Parcelize in tests
)
if (isAndroidTarget) {
freeCompilerArgs.addAll(
"-P",
"plugin:org.jetbrains.kotlin.parcelize:additionalAnnotation=com.example.parcelize.Parcelize",
)
}
}
}
}
}
You can then annotate your KMP models with your custom parcelize annotation.
Cannot access 'dev.icerock.moko.parcelize.Parcelable' which is a supertype of 'in.shabinder.soundbound.models.SongModel'. Check your module classpath for missing or conflicting dependencies
shared module's commonMain has moko parcelize as an api
Any ideas ?