https://kotlinlang.org logo
#serialization
Title
# serialization
d

dawidhyzy

08/19/2022, 9:34 AM
Is there a way to force serialization to use
ksp
instead of
kapt
? I have a module that usess
ksp
only and fails after adding
kapt
j

Javier

08/19/2022, 11:13 AM
serialization doesn't use ksp or kapt
it has its own compiler plugin which probably should be faster than ksp and kapt
d

dawidhyzy

08/25/2022, 11:30 AM
Hmmm... Then any ideas why after adding
kapt
to the module I’m getting
Copy code
The root cause java.lang.IllegalArgumentException was thrown at: org.jetbrains.kotlinx.serialization.compiler.backend.jvm.SerializerCodegenImpl.addSyntheticAnnotationsToDescriptor(SerializerCodegenImpl.kt:122)
I think this is an issue with
kapt
https://youtrack.jetbrains.com/issue/KT-30346
j

Javier

08/25/2022, 11:50 AM
But you are adding kapt to serialize?
you do not need it
d

dawidhyzy

08/25/2022, 12:01 PM
no, adding kapt to use Hilt in this module
looks like I need to move all serialized models into a separate module until this is fixed
j

Javier

08/25/2022, 12:01 PM
looks like a bug
yeah that is a good workaround
d

dawidhyzy

08/25/2022, 12:03 PM
it should have good impact on the build time as well
216 Views