Kotlin doesn't import java dependencies 2019.3

Answered

Hello,

 

I'am trying tu update an existing plugin : https://github.com/witspirit/IntelliJBehave

I do what's indicate here :

https://blog.jetbrains.com/platform/2019/06/java-functionality-extracted-as-a-plugin/

 

Update intelliJ ( also try with kotlin 1.3.70 )

intellij {
version '2019.3.1'
plugins 'java'
  plugins ['org.jetbrains.kotlin:1.3.70-release-IJ2019.3-1','java']
pluginName 'JBehave Support'
}

    id 'org.jetbrains.intellij' version '0.4.16'
id 'org.jetbrains.kotlin.jvm' version '1.3.70'

 

Change depends on plugin.xml

<depends>com.intellij.java</depends>

In any case I got this kind of error : 

 

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.KtFile, unresolved supertypes: com.intellij.psi.PsiClassOwner, com.intellij.psi.PsiModifiableCodeBlock

Unresolved reference: PsiAnnotation

etc. 

 

How to fix it ?

0
2 comments

Philippe,

First of all, it should not be set as an array or multiline:

plugins 'java', 'org.jetbrains.kotlin:1.3.70-release-IJ2019.3-1'

With this configuration, everything builds and runs for me.

0

Note: In gradle.kts scripts it is possible to call `setPlugins` twice; however, it seems that only the last call is going to take effect. 

So, instead of writing: 

intellij {
...
  setPlugins("java")
setPlugins("org.jetbrains.kotlin:1.4.10-release-IJ2020.2-1")
}

You should write:

intellij {
...
  setPlugins("java", "org.jetbrains.kotlin:1.4.10-release-IJ2020.2-1")
}
0

Please sign in to leave a comment.