Skip to content

Commit 8b116d9

Browse files
committed
build: fix build.sbt
1 parent 791ebd7 commit 8b116d9

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

build.sbt

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,24 @@ lazy val baseSettings = Seq(
4848
dependencyOverrides ++= Seq(
4949
"com.fasterxml.jackson.core" % "jackson-databind" % "2.11.0"
5050
),
51-
ThisBuild / scalafixScalaBinaryVersion := CrossVersion.binaryScalaVersion(scalaVersion.value),
52-
semanticdbEnabled := true,
53-
semanticdbVersion := scalafixSemanticdb.revision,
5451
Test / publishArtifact := false,
5552
Test / fork := true,
56-
Test / parallelExecution := false
53+
Test / parallelExecution := false,
54+
Compile / doc / sources := {
55+
val old = (Compile / doc / sources).value
56+
if (scalaVersion.value == Versions.scala3Version) {
57+
Nil
58+
} else {
59+
old
60+
}
61+
},
62+
semanticdbEnabled := true,
63+
semanticdbVersion := scalafixSemanticdb.revision,
64+
// Remove me when scalafix is stable and feature-complete on Scala 3
65+
ThisBuild / scalafixScalaBinaryVersion := (CrossVersion.partialVersion(scalaVersion.value) match {
66+
case Some((2, _)) => CrossVersion.binaryScalaVersion(scalaVersion.value)
67+
case _ => CrossVersion.binaryScalaVersion(Versions.scala212Version)
68+
})
5769
)
5870

5971
val `docker-controller-scala-core` = (project in file("docker-controller-scala-core"))
@@ -266,4 +278,4 @@ val `docker-controller-scala-root` = (project in file("."))
266278

267279
// --- Custom commands
268280
addCommandAlias("lint", ";scalafmtCheck;test:scalafmtCheck;scalafmtSbtCheck;scalafixAll --check")
269-
addCommandAlias("fmt", ";scalafmtAll;scalafmtSbt")
281+
addCommandAlias("fmt", ";scalafmtAll;scalafmtSbt;scalafix RemoveUnused")

0 commit comments

Comments
 (0)