Is there a way to see the `Parcelable` code, gener...
# android
a
Is there a way to see the
Parcelable
code, generated by
kotlin-parcelize
plugin, directly in Android Studio? I can't see it with "Show Kotlin Bytecode", and I don't want to build the whole APK and decompile it.
e
usually generated code is placed in build folder. Check
build\generaed\source
or somewhere around
👍 1
a
I've got an answer in another chat: • you can go to
/build/tmp/kotlin-classes/
in the same gradle module where your class is contained • then you find your compiled class • then in the Studio menu press
Tools/Kotlin/Decompile to Java
Works like a charm!
e
Great! That is decompilation, I wonder if the generated source is also available. But it is off topic
a
AFAIK this code generation does not generate source code directly, it gets compiled on the fly, but indeed, this is a different issue)
e
Not an issue but nice optimisation!
c
Compiler plugins never generate „source code“ but modify the output.
a
Yeah, come to think of it, Parcelize wouldn't even be possible with regular annotation processing, as it requires modification of the initial class. Thanks for the addition)