Hey! I am trying to build an mpp project with andr...
# kotlin-native
m
Hey! I am trying to build an mpp project with android and native (ios) modules. In the common module, I have @Serialization annotation which cannot be shared with native because serialization support is limited. Is there a suggested workaround?
a
do you need the serialization support in native, or just the common code? If you don't need serialization support in native, you can use
expect annotation class
to typealias
@Serialization
on non-KN platforms to the actual implementation, and then either use Kotlin 1.2.60's
@OptionalExpectation
to avoid declaring it at all on KN, or just stub it out to a no-op
m
I am just using it for data classes and am defining them in common
a
In that case, the above approach should hopefully work for you
m
Yeah thanks😀