I want to create a sbt plugin
this is my project
build.sbt file:
lazy val root = (project in file(".")).
settings(
name := "test-plagin",
version := "0.1.0",
organization := "com.test",
scalaVersion := "2.13.0",
sbtPlugin := true,
)
main file with task
import sbt.{AutoPlugin, TaskKey}
object HelloPlugin extends AutoPlugin {
object autoImport {
val sayHello: TaskKey[Unit] = TaskKey("saying hello")
}
import autoImport._
override def projectSettings = Seq(
sayHello := {
println("hello")
}
)
}
During compiling I get an error: java.lang.NoClassDefFoundError: scala/collection/immutable/StringOps When I change the version to 2.12.6 - compiling is success. How I can fix error in 2.13?