Reputation: 6396
I want to use this library https://github.com/prismicio/scala-kit.
My project's scala version is 2.13.1
. When I add this library as dependency:
val prismic = "io.prismic" % "scala-kit_2.11" % "1.3.1"
I get NoClassDefinitionFound
error at runtime. I guess it's due to version conflict. So how do I publish this library so it works for scala version 2.13.1
?
Upvotes: 0
Views: 516
Reputation: 170745
What you should use is
val prismic = "io.prismic" %% "scala-kit" % "1.3.1"
which adds the correct suffix automatically, and you can't forget to change it when changing the Scala version. But if you look at https://mvnrepository.com/artifact/io.prismic/scala-kit, you'll see there is no version for 2.13 at all, but there are versions for 2.12. So if you want to change your Scala version, use 2.12.10 (the latest 2.12).
Upvotes: 0
Reputation: 162
Scala has no binary compatibility across major versions (i.e. 2.11.1 and 2.13.1). Either downgrade to 2.11.1 (or 2.12.2 if you switch to the latest version of the library) scalaVersion := "2.11.1"
or compile the library to 2.13.1 yourself.
Upvotes: 3