classes. How I can do that?
Should I use kapt or is there some way to do it via compiler plugin?
s
shikasd
09/07/2020, 7:40 AM
Hey, I think the best way of approaching that is through a compiler plugin. If you are only modifying the implementation of toString, you don't have to change much, mostly generating new method body through IR.
I did a similar in implementation thing for an old backend, write-up here: https://medium.com/bumble-tech/fixing-serialization-of-kotlin-objects-once-and-for-all-95886fddba7a
The example repo should also contain implementation for the new IR backend, albeit with an older version of compiler (a thing or two have changed since ;))