I recently started developing an application with Kotlin. I found myself constantly wondering exactly what effect the Kotlin features have on the actual compiled classes. I was able to automatically generate the answers I needed.
First of all, my solution is here on GitHub.
What I do is:
- Write Kotlin code
- Compile the Kotlin code
- De-compile the resulting classes to Java code
- Gather the original Kotlin and resulting Java code
- Render markdown where I present this in a nice and tidy way
The input is only Kotlin and the output is a report telling me what I want to know.
Feel free to clone the repo and experiment yourself. I happily accept pull requests.