Is it possible to enable compiler plugins for kts ...
# scripting
t
Is it possible to enable compiler plugins for kts compilation. I would like to compile Compose code inside of an Kotlin application. Ideally i would like to have the code as kotlin script and than execute the script during runtime from the host program.
m
It is possible. You can pass them on the command line. It's not the easiest thing but I tried it, I think with the serialization plugin, and it worked.
1
t
Thank you looks promising. I will have a look
Yes it is possible to use plugins but i think Compose still uses a modified kotlin compiler or s.th. like that because i get following error when i execute kotlinc in cmd line: exception: java.lang.IllegalStateException: The provided plugin androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar is not compatible with this version of compiler
m
Yea, the compose setup looks more complex