I have a plugin that I am building, I would like to be able to override the setting of an other plugin, let's say sbt-assembly.
I would like in my AutoPlugin be able to do:
import sbtassembly
[...]
override def projectSettings: Seq[Def.Setting[_]] = {
Seq(
assembly := { /* override the task */ }
)
}
I have tried to add in ./build.sbt :
libraryDependencies += "com.eed3si9n" % "sbt-assembly" % "0.14.9"
But I get
(update) sbt.librarymanagement.ResolveException: unresolved dependency: com.eed3si9n#sbt-assembly;0.14.9: not found
I tried to add it in ./project/plugins.sbt but if I understand correctly, that will add it as a build tool to build my plugin not as something accessible within the code of the plugin and it seems that I am right since I cannot access sbtassembly package.
Any tips ?
Thanks !
I found the solution !
It is to add
in
build.sbtnot inproject/plugins.sbt.I guess
sbt-assemblyis not a library, it is a plugin. So to add a plugin, you need to useaddSbtPlugin.And since you want it in the code, not in the compiler, you put it in
build.sbt, not inproject/plugins.sbt.