Skip to content

Commit c21e4f3

Browse files
committed
Preliminary refactoring: include source dir scala-2.12+ for scala3 as well, remove duplications
This is the commit message scalacenter#2: build sbt refactor for core and rules, preliminary
1 parent 46cdea5 commit c21e4f3

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ lazy val core = projectMatrix
8484
}
8585
)
8686
.defaultAxes(VirtualAxis.jvm)
87-
.jvmPlatform(buildScalaVersions :+ scala3, Seq(), p => p)
87+
.jvmPlatform(buildScalaVersions :+ scala3)
8888
.enablePlugins(BuildInfoPlugin)
8989

9090
lazy val rules = projectMatrix
@@ -105,7 +105,7 @@ lazy val rules = projectMatrix
105105
}
106106
)
107107
.defaultAxes(VirtualAxis.jvm)
108-
.jvmPlatform(buildScalaVersions :+ scala3, Seq(), p => p)
108+
.jvmPlatform(buildScalaVersions :+ scala3)
109109
.dependsOn(core)
110110
.enablePlugins(BuildInfoPlugin)
111111

project/ScalafixBuild.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,10 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
203203
Compile / doc / scalacOptions ++= scaladocOptions,
204204
Compile / unmanagedSourceDirectories ++= {
205205
val sourceDir = (Compile / sourceDirectory).value
206+
val scala212PlusSourceDir = "scala-2.12+"
206207
CrossVersion.partialVersion(scalaVersion.value) match {
207-
case Some((2, n)) if n >= 12 => Seq(sourceDir / "scala-2.12+")
208+
case Some((2, n)) if n >= 12 => Seq(sourceDir / scala212PlusSourceDir)
209+
case Some((3, _)) => Seq(sourceDir / scala212PlusSourceDir)
208210
case _ => Seq()
209211
}
210212
},

scalafix-rules/src/main/scala-3/scalafix/internal/rule/TPrintImplicits.scala

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)