There are two Kotlin compiler distributions, both contain (not depend on!) a few libraries, most notably Google Guava. Due to this, when kotlin-plugin is added as a dependency alongside with other plugins which depend on different version of Guava, things break with hard-to-trace errors. Kotlin is aware of this and publishes embeddable version which relocates all baked dependencies into different package, thus fixing this problem.
Workaround isEDIT:would be to add this plugin with:
There are two Kotlin compiler distributions, both contain (not depend on!) a few libraries, most notably Google Guava. Due to this, when
kotlin-plugin
is added as a dependency alongside with other plugins which depend on different version of Guava, things break with hard-to-trace errors. Kotlin is aware of this and publishesembeddable
version which relocates all baked dependencies into different package, thus fixing this problem.Workaround
isEDIT: would be to add this plugin with:which is not very clean. But the plugin uses some of the libraries which are relocated and breaks.
Adding
-embeddable
afterkotlinLib("compiler
inbuild.sbt
and changing imports should be enough.