Skip to content

Commit

Permalink
Preliminary refactoring: include source dir scala-2.12+ for scala3 as…
Browse files Browse the repository at this point in the history
… well, remove duplications

This is the commit message scalacenter#2:

build sbt refactor for core and rules, preliminary
  • Loading branch information
rvacaru committed Aug 12, 2022
1 parent 94f7548 commit ab4ea61
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ lazy val core = projectMatrix
}
)
.defaultAxes(VirtualAxis.jvm)
.jvmPlatform(buildScalaVersions :+ scala3, Seq(), p => p)
.jvmPlatform(buildScalaVersions :+ scala3)
.enablePlugins(BuildInfoPlugin)

lazy val rules = projectMatrix
Expand All @@ -105,7 +105,7 @@ lazy val rules = projectMatrix
}
)
.defaultAxes(VirtualAxis.jvm)
.jvmPlatform(buildScalaVersions :+ scala3, Seq(), p => p)
.jvmPlatform(buildScalaVersions :+ scala3)
.dependsOn(core)
.enablePlugins(BuildInfoPlugin)

Expand Down
4 changes: 3 additions & 1 deletion project/ScalafixBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
Compile / doc / scalacOptions ++= scaladocOptions,
Compile / unmanagedSourceDirectories ++= {
val sourceDir = (Compile / sourceDirectory).value
val scala212PlusSourceDir = "scala-2.12+"
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n >= 12 => Seq(sourceDir / "scala-2.12+")
case Some((2, n)) if n >= 12 => Seq(sourceDir / scala212PlusSourceDir)
case Some((3, _)) => Seq(sourceDir / scala212PlusSourceDir)
case _ => Seq()
}
},
Expand Down

This file was deleted.

0 comments on commit ab4ea61

Please sign in to comment.