This won't be easy or version-stable since there is no public plugin API, but if you're willing to sacrifice being able to update to new Kotlin versions right away you could in theory look at existing plugins by JetBrains, namely kotlin-allopen plugin and kotlin-noarg plugin.