forked from alejandrohdezma/sbt-scalafmt-defaults
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
21 lines (17 loc) · 1004 Bytes
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ThisBuild / scalaVersion := "2.12.17"
ThisBuild / organization := "com.alejandrohdezma"
ThisBuild / pluginCrossBuild / sbtVersion := "1.2.8"
addCommandAlias("ci-test", "fix --check; mdoc; scripted")
addCommandAlias("ci-docs", "github; mdoc; headerCreateAll")
addCommandAlias("ci-publish", "github; ci-release")
lazy val scalafmt = "org.scalameta" % "sbt-scalafmt" % "[2.0.0,)" % Provided // scala-steward:off
lazy val documentation = project
.enablePlugins(MdocPlugin)
.settings(mdocOut := file("."))
.settings(mdocVariables += "SCALAFMT_CONF" -> IO.read(file(".scalafmt.conf")))
lazy val `sbt-scalafmt-defaults` = module
.enablePlugins(SbtPlugin)
.settings(addSbtPlugin(scalafmt))
.settings(scriptedLaunchOpts += s"-Dplugin.version=${version.value}")
.settings(scriptedLaunchOpts += s"-Dscalafmt.conf.content=${IO.read(file(".scalafmt.conf"))}")
.settings(Compile / unmanagedResources += (LocalRootProject / baseDirectory).value / ".scalafmt.conf")