[Solved] Crash when using Kotlin


#1

Hi! When i add Kotlin to my Gradle project and use it somewhere in code ,server on starting drops crash (it’s long ,so i just paste head of the log):

[13:53:00 ERROR] [Sponge]: Could not pass GameStartedServerEvent$Impl to Plugin{id=hellosponge, name=HelloSponge, version=1.0-SNAPSHOT, source=mods\HelloSponge-1.0-SNAPSHOT.jar}
java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics

#2

You have added Kotlin to your dependencies but it is not there at runtime. You can either use the shadow Gradle plugin to bundle and relocate Kotlin in your jarfile or you can use the Spotlin Sponge plugin to provide it externally.