When I include dokka-analysis as dependency in Int...
# dokka
j
When I include dokka-analysis as dependency in IntelliJ Plugin project, I get this error: ERROR - ect.impl.ProjectFrameAllocator - java.lang.ClassCastException: Cannot cast org.jetbrains.plugins.template.listeners.MyProjectManagerListener to com.intellij.openapi.project.ProjectManagerListener are there components inside dokka-analysis, which are detected by IntelliJ OpenAPI ?
m
Tbh i don’t know what can be the reason of it, but i suspect that maybe an IJ version missmatch is to be blamed: https://github.com/Kotlin/dokka/blob/v1.4.32/gradle.properties We use subset of features from IJ and repackage them in dokka-analysis jar
j
I could imagine that IJ picks up some xml and/or component from dokka-analysis.jar
anyway.. this is a curious situation, as I am using a library for doing something that PSI from IJ Api should provide, but the dokka API is much easier to use, and some things are just not straightforward with IJs Api. So to move forward, I will try to find what exactly it is, that IJ is picking up from dokka-analysis….hopefully it can be identified and fixed….
@Marcin Aman I think the problem is with the transitive dependency "dokka-analysis-intellij" it contains a META-INF/plugin.xml now my guess is, that I can't just exclude it... any ideas ?
ok, so I tried excluding it, and found that the problem is actually even more complicated: error: loader constraint violation: loader com.intellij.ide.plugins.cl.PluginClassLoader @5feeda9c wants to load interface com.intellij.openapi.project.Project. A different interface with the same name was previously loaded by com.intellij.util.lang.PathClassLoader @4bbfb90a. (com.intellij.openapi.project.Project is in unnamed module of loader com.intellij.util.lang.PathClassLoader @4bbfb90a, parent loader 'platform') this stems from dokka's kotlin-analysis-compiler
Stupid question: is Dokka (core + analysis) already included in IntelliJ Ultimate ?
m
No, dokka is not bundled in any JB product