I have my build.sbt
file like this:
lazy val root = (project in file(".")
.settings(libraryDependencies ++= Seq(...))
and a second file (in the same folder) like this:
lazy val releaseStuff: Def.Setting[Task[Unit]] = DockerSbtPlugin.releaseStuff
lazy val root = (project in file(".").settings(releaseStuff)
But the command releaseStuff
is not recognized, I get:
sbt:sitemap> releaseStuff
[error] Not a valid key: releaseStuff (similar: releasePuff, releaseCough)
[error] releaseStuff
[error] ^
Am I doing something wrong?
Please note that releaseStuff
depends on a plugin so it does not compile if put inside the project
folder.
I don't know what release.sbt
is, but you can configure releaseStuff
inside of the project
folder. You just have to import the applicable plugin packages explicitly.
For example, when I want to use the native-packager
for docker, I create a project/docker.scala
file with
import sbt._
import Keys._
import com.typesafe.sbt.packager.docker._
import com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport._
object Docker {
lazy val settings = Seq(
...
)
}
and include it from build.sbt
lazy val root = (project in file(".")
.settings(
name := "widget",
Docker.settings
)
)