https://kotlinlang.org logo
Title
b

bamboo

05/16/2017, 7:39 PM
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

damian

05/16/2017, 8:15 PM
bamboo: I think something like that is done here, if it helps https://github.com/elizarov/KotlinSerializationPrototypePlayground
b

bamboo

05/16/2017, 8:53 PM
Hm, almost, it still requires additional configuration:
compileKotlin {
    kotlinOptions.freeCompilerArgs += ["-Xplugin", "lib/kotlin-serialization-gradle.jar"]
}
But I think that might be enough for my use case. Thanks, @damian!
👍 1
i

ilya.chernikov

05/17/2017, 10:47 AM
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

bamboo

05/17/2017, 12:06 PM
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

ilya.chernikov

05/17/2017, 12:16 PM
Yes, that’s usually a separate one.
b

bamboo

05/17/2017, 12:18 PM
Got it.