Kotlin's plugin for CLion depends on the built-in java module

Answered

I'm building a plugin for kotlin native projects (https://github.com/raniejade/godot-kotlin/tree/master/godot-kotlin-idea-plugin) and wanted to make that plugin available in CLion. However I'm getting stuck with this error when building for clion.

e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class org.jetbrains.kotlin.psi.KtProperty, unresolved supertypes: com.intellij.psi.PsiModifiableCodeBlock
class org.jetbrains.kotlin.psi.KtNamedFunction, unresolved supertypes: com.intellij.psi.PsiModifiableCodeBlock

I've solved this problem when building for IntelliJ IDEA by adding the built-in plugin java. The same fix does not work when I'm building for CLion (I'm using the dependency org.jetbrains.kotlin.native.clion instead of org.jetbrains.kotlin here).

0
4 comments

Hi Ranie,

CLion has no java module bundled - it is not possible to refer to its classes for now, sorry.

0

That's very unfortunate but totally understandable. Are there plans to make the kotlin plugin not depend on the java plugin?

0

I've asked CLion team regarding that and got the following information:

In Kotlin/Native plugin for CLion we are using https://plugins.jetbrains.com/plugin/12665-kotlin-native-platform-dependencies — this plugin includes java module inside.

I think that this is something that you're looking for.

1

That actually solved my problem, thanks!!

0

Please sign in to leave a comment.