To use sbt-no-publish in an existing SBT project with version 1.0 or greater, add the following dependencies to your
plugins.sbt
depending on your needs:
addSbtPlugin("io.chrisdavenport" % "sbt-no-publish" % "<version>")
lazy val root = project.in(file("."))
.enablePlugins(NoPublishPlugin) // We disable publishing of the root project
.aggregate(core, site)
lazy val core = project.in(file("core"))
.settings(commonSettings, releaseSettings)
.settings(
name := "project-name"
)
lazy val site = project.in(file("site"))
.disablePlugins(MimaPlugin)
.enablePlugins(NoPublishPlugin) // We disable publishing of the site
.enablePlugins(MicrositesPlugin)
.enablePlugins(MdocPlugin)
.dependsOn(core)