kotlin plugin compatibility
Hi,
I made a plugin in kotlin for clion. If I compile the plugin configuring the gradle as
intellij.version='CL-2019.3.4'
I get a plugin that work fine on the CLion 2019.3.4 but in 2020.1 EAP I get the error
java.lang.NoSuchMethodError: 'com.intellij.ui.layout.LayoutBuilder com.intellij.ui.layout.LayoutImplKt.createLayoutBuilder$default(boolean, int, java.lang.Object)'
I not call directly that class but I suppose that at some point it is called by the clion library.
But there is another weird thing:
If I change the grade configuration so that
intellij.version='LATEST-EAP-SNAPSHOT'
without changing any line of my code
now the plugin works fine for 2020.1 EAP but I get the error:
java.lang.NoSuchMethodError: 'com.intellij.ui.layout.CellBuilder com.intellij.ui.layout.Cell.invoke$default(com.intellij.ui.layout.Cell, javax.swing.JComponent, com.intelli
j.ui.layout.CCFlags[], com.intellij.ui.layout.GrowPolicy, java.lang.String, int, java.lang.Object)'
when it run on 2019.3.4 !
So, somebody can explain me this behaviour
What I have to do to have a plugin working fine for both the version ?
Paolo
请先登录再写评论。
Hello Paolo,
The platform doesn't guarantee kotlin UI DSL compatibility between major versions (including binary compatibility). Sometimes, it's suggested to create separate builds for each major platform version.
You may also try to file an issue in YouTrack with more details and full stack traces.