Hi, about Kotlin compiler plugins, is it possible ...
# announcements
b
Hi, about Kotlin compiler plugins, is it possible to activate a plugin just by having a jar in the compilation classpath? /cc @ilya.chernikov
d
bamboo: I think something like that is done here, if it helps https://github.com/elizarov/KotlinSerializationPrototypePlayground
b
Hm, almost, it still requires additional configuration:
Copy code
compileKotlin {
    kotlinOptions.freeCompilerArgs += ["-Xplugin", "lib/kotlin-serialization-gradle.jar"]
}
But I think that might be enough for my use case. Thanks, @damian!
đź‘Ť 1
i
bamboo: yes, at least you need to add
-Xplugin
with appropriate arg. But I actually encountered some problems with it, and had no time to investigate. So, please report if something is not working as expected there.
b
Hey @ilya.chernikov, thanks. With the
-Xplugin
argument it worked but then I realized IntelliJ was not picking up the additional configuration. I assume that would require a proper IntelliJ plugin, right?
i
Yes, that’s usually a separate one.
b
Got it.