"Groovy AST Transformer" like feature for Kotlin?


#1

Is there any simple way to manipulate kotlin sources during compile time? Something similar to groovy AST Transformers


#2

We do not provide such an API yet, and I don't think it will ever be as easy as in Groovy.


#3

Why is so hard? Is that becuase kotlin is statically typed?


#4

One difference from Groovy is indeed that loading compiler plugins would not be as easy in Kotlin because of its static nature. But despite all and any technicalities I do not think that functionality of this sort should be too easily accessible for non-scripting languages: too many ways to create subtle problems.