Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify SBT build and fix docs generation (#456)
* These settings aren't needed anymore They're automatically provided by `sbt-github` * Remove unused method * This is the new way of preventing module publishing * Use new `project` macro for creating new projects This macro will use the `val` name as the expected folder and `moduleName` * We need to add `mdocIn` for project docs * Not needed (already provided by `sbt-github-mdoc`) * The root module is auto-created by SBT, only need to skip publishing * Launch scalafmtSbt
- Loading branch information
1 parent
d048d50
commit 58816e8
Showing
2 changed files
with
16 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,36 @@ | ||
addCommandAlias("ci-test", "+scalafmtCheck; +scalafmtSbtCheck; +docs/mdoc; +test") | ||
addCommandAlias("ci-docs", "project-docs/mdoc; headerCreateAll") | ||
|
||
lazy val root = (project in file(".")) | ||
.settings(moduleName := "github4s-root") | ||
.aggregate(github4s) | ||
.dependsOn(github4s) | ||
.settings(noPublishSettings: _*) | ||
skip in publish := true | ||
|
||
lazy val github4s = | ||
(project in file("github4s")) | ||
.settings(moduleName := "github4s") | ||
.enablePlugins(BuildInfoPlugin) | ||
.settings( | ||
buildInfoKeys := Seq[BuildInfoKey]( | ||
name, | ||
version, | ||
"token" -> sys.env.getOrElse("GITHUB_TOKEN", "") | ||
), | ||
buildInfoPackage := "github4s" | ||
) | ||
.settings(coreDeps: _*) | ||
lazy val github4s = project | ||
.enablePlugins(BuildInfoPlugin) | ||
.settings( | ||
buildInfoKeys := Seq[BuildInfoKey]( | ||
name, | ||
version, | ||
"token" -> sys.env.getOrElse("GITHUB_TOKEN", "") | ||
), | ||
buildInfoPackage := "github4s" | ||
) | ||
.settings(coreDeps: _*) | ||
|
||
////////// | ||
// DOCS // | ||
////////// | ||
|
||
lazy val docs = (project in file("docs")) | ||
lazy val docs = project | ||
.aggregate(github4s) | ||
.dependsOn(github4s) | ||
.settings(moduleName := "github4s-docs") | ||
.settings(micrositeSettings: _*) | ||
.settings(noPublishSettings: _*) | ||
.settings(skip in publish := true) | ||
.enablePlugins(MicrositesPlugin) | ||
|
||
lazy val `project-docs` = (project in file(".docs")) | ||
.aggregate(github4s) | ||
.dependsOn(github4s) | ||
.settings(moduleName := "github4s-project-docs") | ||
.settings(mdocVariables += "NAME" -> "github4s") | ||
.settings(mdocIn := file(".docs")) | ||
.settings(mdocOut := file(".")) | ||
.settings(noPublishSettings: _*) | ||
.settings(skip in publish := true) | ||
.enablePlugins(MdocPlugin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters