pfn / kotlin-plugin

Build kotlin code using sbt
MIT License
136 stars 35 forks source link

SBT 1.2.1 and NoSuchMethodError: sbt.package$.singleFileJsonFormatter()Lsjsonnew/JsonFormat #42

Open javaguruen opened 3 years ago

javaguruen commented 3 years ago

When using version 2.0.0 of this plugin in a play project that uses SBT 1.2.1 I'm unable to load and compile my project. Could it be because this kotlin-plugin is compiled with SBT 1.3 ? Is there a way around this besides upgrading SBT, we're kind of stuck on 1.2 for the moment.

Stack trace:

[info] Loading settings for project esignering-build from plugins.sbt,scan-plugins.sbt ...
[info] Loading project definition from C:\dev\ambita\esignering\project
[error] java.lang.NoSuchMethodError: sbt.package$.singleFileJsonFormatter()Lsjsonnew/JsonFormat;
[error]         at kotlin.Keys$.<init>(Keys.scala:19)
[error]         at kotlin.Keys$.<clinit>(Keys.scala)
[error]         at kotlin.KotlinPlugin$.<init>(KotlinPlugin.scala:71)
[error]         at kotlin.KotlinPlugin$.<clinit>(KotlinPlugin.scala)
[error]         at java.lang.Class.forName0(Native Method)
[error]         at java.lang.Class.forName(Class.java:348)
[error]         at sbt.internal.inc.ModuleUtilities$.getObject(ModuleUtilities.scala:20)
[error]         at sbt.internal.inc.ModuleUtilities$.getCheckedObject(ModuleUtilities.scala:27)
[error]         at sbt.internal.inc.ModuleUtilities$.$anonfun$getCheckedObjects$1(ModuleUtilities.scala:31)
[error]         at scala.collection.immutable.Stream.$anonfun$map$1(Stream.scala:415)
[error]         at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1169)
[error]         at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1159)
[error]         at scala.collection.generic.Growable.loop$1(Growable.scala:54)
[error]         at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:58)
[error]         at scala.collection.generic.Growable.$plus$plus$eq$(Growable.scala:50)
[error]         at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:186)
[error]         at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:44)
[error]         at scala.collection.TraversableLike.$plus$plus(TraversableLike.scala:147)
[error]         at scala.collection.TraversableLike.$plus$plus$(TraversableLike.scala:143)
[error]         at scala.collection.immutable.List.$plus$plus(List.scala:207)
[error]         at sbt.internal.PluginDiscovery$.discoverAll(PluginDiscovery.scala:56)
[error]         at sbt.internal.Load$.loadPlugins(Load.scala:1318)