There are two different maven packages relevant to kotlin compiler:
What are the differences between the two and when should they be used respectively?
There are two different maven packages relevant to kotlin compiler:
What are the differences between the two and when should they be used respectively?
kotlin-compiler-embeddable
should be used in scenarios when it’s necessary to have the compiler packaged as a single jar with no external dependencies. In all other cases, use the regular kotlin-compiler
.
Hey Dmitry,
I’ve been working on Kotlin support for Bazel, one thing I’ve noticed is that:
1P Jetbrains compiler plugins are built against kotlin/compiler/plugin-api at master · JetBrains/kotlin · GitHub which includes in the method signature for ComponentRegistrar. registerProjectComponents(com.intellij.mock.MockProject, CompilerConfiguration): kotlin/ComponentRegistrar.kt at 2f835ed66f0583cbcf92f05fd8842910f5d56f10 · JetBrains/kotlin · GitHub
3P plugins tend to be built against kotlin-compiler-embeddable which includes in the method signature org.jetbrains.kotlin.com.intellij.mock.MockProject instead.
Bazel Kotlin rules use kotlin-compiler which works fine for 1P plugins, but 3P plugins fails with an AbstractMethodError because the signature doesn’t match for ComponentRegistrar. registerProjectComponents(MockProject, CompilerConfiguration).
I’m guessing the right thing to do is to have the Kotlin rules use compiler-plugin-embeddable here?
Note that the kotlin-compiler-embeddable artifact is missing source code (even though there is a -sources.jar, it’s empty). To be able to debug it from an IDE I had to download the kotlin-compiler-1.5.10-sources.jar file and point the IDE to it manually.
Hi
i am having problem in some package in react native witch is using kotlin-somplier-embede
it doesn’t download during building project
is there any way that i put kotlin-somplier-embede.x.x.jar file in some folder in windows and then no need to download .jar file during build ?
can you please help me where should I have to copy the .jar file ?