I want to use third party library in a taskKey
in the .Scala/.sbt project files.
My problem is when I try to import the file I get a compilation error.
My goal is simple I want to add a task key that execute some logic using sbt cli, I have tried an example using sbt command line application, but it doesn't meet my need because I need to package the application to test the code.
So how could I import dependencies into sbt cli during the load phase?
Example:
val customTaskKey = TaskKey[Unit]("customTaskKey", "Runs customTaskKey")
lazy val myProjectSettings: Seq[Setting[_]] = Seq(
customTaskKey :={
val instance : ThirdPartLibraryClass()
// ^
// Symbol not found : compilation error
}
)