I'm writing a plugin in kotlin that uses a framewo...
# announcements
s
I'm writing a plugin in kotlin that uses a framework which also is written in kotlin (and java). That framework can be standalone, which means it must have kotlin present in its jar. There's a warning that says the framework has kotlin in its jar and may cause unwanted behaviour. I'm just now suffering from this warning which is more of an error preventing me from writing kotlin in Intellij. But the code compiles fine via gradle. I've come to realise the kotlin IJ plugin is misfunctioning because the framework has .kotlin_module files in it (from the kotlin shading). How do I get around this? The only solution I have come up with is to produce a jar with all shades except kotlin which would be used for plugin writing, and one with kotlin shaded which would be the runtime jar. is there any better ideas?
s
What kind of plugin are you writing? Specifically, what is it supposed to “plug into”, so to speak
s
the framework
s
okay, well, what’s the framework?
s
This has only started to become a problem when I updated to 2018.2
s
Ah, I see. I also ran into some weirdness when I upgraded - I ended up having to revert back to an older Kotlin version and upgraded again this morning with no issue
s
The problem is the UI doesnt let me change kotlin versions for intellij. How did you manage it?
s
My specific issue seemed to be with the
org.jetbrains.kotlin.jvm
1.2.60 artifact I had pulled down earlier, so I’m not sure if it’s quite the same problem you’re running into
All I really did was revert my
build.gradle
to 1.2.51 and then bumped the version number later
s
Hmm. well i dont have jvm as a dep on either project, but I've tried going back to 1.2.51 and no luck. I'll try going back further
s
wait, how do you not depend on kotlin-jvm if you’re writing this in java and kotlin?
s

http://supa.me/cwGwCn.png

I suppose it's because the gradle plugin does that magic behind the scenes
s
ahh I see
s
😠 so downgrading to 1.2.10 solves my problems, but obviously not ideal
s
good find
s
Thanks to youtrack haha

http://supa.me/SK6XGk.png

🔥 1