@@ -63,18 +63,6 @@ lazy val interfaces = project
6363 )
6464 .disablePlugins(ScalafixPlugin )
6565
66- // Scala 3 macros vendored separately (i.e. without runtime classes), to
67- // shadow Scala 2.13 macros in the Scala 3 compiler classpath, while producing
68- // code valid against Scala 2.13 bytecode
69- // TODO: after replacing with metaconfig_3, remove -Wconf filter in ScalafixBuild
70- lazy val `compat-metaconfig-macros` = projectMatrix
71- .settings(
72- libraryDependencies += metaconfig cross CrossVersion .for3Use2_13
73- )
74- .defaultAxes(VirtualAxis .jvm)
75- .jvmPlatform(cliScalaVersions)
76- .disablePlugins(ScalafixPlugin )
77-
7866lazy val core = projectMatrix
7967 .in(file(" scalafix-core" ))
8068 .settings(
@@ -83,33 +71,13 @@ lazy val core = projectMatrix
8371 libraryDependencies ++= Seq (
8472 googleDiff,
8573 metaconfig,
86- scalametaFor3Use2_13 ,
87- semanticdbSharedFor3Use2_13 ,
74+ scalameta ,
75+ semanticdbShared ,
8876 collectionCompat
8977 )
9078 )
9179 .defaultAxes(VirtualAxis .jvm)
92- .jvmPlatform(coreScalaVersions)
93- .enablePlugins(BuildInfoPlugin )
94-
95- // keep compiling core3 without exposing it to matrix projects, just
96- // to make https://github.com/scalacenter/scalafix/issues/2041 easier
97- lazy val core3 = project
98- .in(file(" scalafix-core" ))
99- .settings(
100- noPublishAndNoMima,
101- buildInfoSettingsForCore,
102- scalaVersion := scala3LTS,
103- libraryDependencies ++= Seq (
104- googleDiff,
105- metaconfig
106- ) ++ Seq (
107- scalametaFor3Use2_13,
108- semanticdbSharedFor3Use2_13
109- ).map { mod =>
110- mod.exclude213((orgLiHaoYi, " sourcecode" ), collectionCompat)
111- }
112- )
80+ .jvmPlatform(cliScalaVersions)
11381 .enablePlugins(BuildInfoPlugin )
11482
11583lazy val rules = projectMatrix
@@ -119,24 +87,11 @@ lazy val rules = projectMatrix
11987 description := " Built-in Scalafix rules" ,
12088 isFullCrossVersion,
12189 buildInfoSettingsForRules,
122- libraryDependencies ++= {
123- if (! isScala3.value)
124- Seq (
125- orgScalaLang % " scala-compiler" % scalaVersion.value,
126- orgScalaLang % " scala-reflect" % scalaVersion.value,
127- semanticdbScalacCore,
128- collectionCompat
129- )
130- else
131- Seq (
132- orgScalaLang %% " scala3-presentation-compiler" % scalaVersion.value,
133- coursierInterfaces
134- )
135- }
90+ libraryDependencies += metaconfig,
91+ settingsForSemanticdbScalac
13692 )
13793 .defaultAxes(VirtualAxis .jvm)
13894 .jvmPlatform(CrossVersion .full, cliScalaVersions)
139- .dependsOn(`compat-metaconfig-macros` % " provided" )
14095 .dependsOn(core)
14196 .enablePlugins(BuildInfoPlugin )
14297
@@ -145,35 +100,13 @@ lazy val reflect = projectMatrix
145100 .settings(
146101 moduleName := " scalafix-reflect" ,
147102 isFullCrossVersion,
148- libraryDependencies ++= Seq (
149- coursierInterfaces,
150- semanticdbScalacCore,
151- orgScalaLang % " scala-compiler" % scalaVersion.value,
152- orgScalaLang % " scala-reflect" % scalaVersion.value
153- )
103+ libraryDependencies += coursierInterfaces,
104+ settingsForSemanticdbScalac
154105 )
155106 .defaultAxes(VirtualAxis .jvm)
156- .jvmPlatform(coreScalaVersions )
107+ .jvmPlatform(cliScalaVersions )
157108 .dependsOn(core)
158109
159- // keep compiling reflect3 without exposing it to matrix projects, just
160- // to make https://github.com/scalacenter/scalafix/issues/2041 easier
161- lazy val reflect3 = project
162- .in(file(" scalafix-reflect" ))
163- .settings(
164- isFullCrossVersion,
165- noPublishAndNoMima,
166- scalaVersion := scala3LTS,
167- libraryDependencies ++= Seq (
168- // CrossVersion.for3Use2_13 would only lookup a binary version artifact, but this is published with full version
169- semanticdbScalacCore
170- .cross(CrossVersion .constant(scala213))
171- .exclude213((orgLiHaoYi, " sourcecode" ), collectionCompat),
172- orgScalaLang %% " scala3-compiler" % scalaVersion.value
173- )
174- )
175- .dependsOn(core3)
176-
177110lazy val cli = projectMatrix
178111 .in(file(" scalafix-cli" ))
179112 .settings(
@@ -182,6 +115,7 @@ lazy val cli = projectMatrix
182115 libraryDependencies ++= Seq (
183116 nailgunServer,
184117 jgit,
118+ metaconfig,
185119 commonText
186120 ),
187121 libraryDependencies ++= {
@@ -212,7 +146,6 @@ lazy val cli = projectMatrix
212146 .defaultAxes(VirtualAxis .jvm)
213147 .jvmPlatform(CrossVersion .full, cliScalaVersions)
214148 .dependsOn(interfaces)
215- .dependsOn(`compat-metaconfig-macros` % " provided" )
216149 .dependsOn(reflect, rules)
217150
218151lazy val testkit = projectMatrix
@@ -298,16 +231,9 @@ lazy val unit = projectMatrix
298231 libraryDependencies ++= Seq (
299232 jgit,
300233 munit,
234+ scalametaTestkit,
301235 scalatest
302236 ),
303- libraryDependencies += {
304- if (! isScala3.value) {
305- scalametaTeskitFor3Use2_13
306- } else {
307- // exclude _2.13 artifacts that have their _3 counterpart in the classpath
308- scalametaTeskitFor3Use2_13.exclude213(munit)
309- }
310- },
311237 buildInfoPackage := " scalafix.tests" ,
312238 buildInfoKeys := Seq [BuildInfoKey ](
313239 " scalaVersion" -> scalaVersion.value
@@ -465,7 +391,7 @@ lazy val docs = projectMatrix
465391 Dependencies .runtimeDepsForBackwardCompatibility
466392 .map(_.withRevision(VersionScheme .Always )),
467393 // force eviction of mdoc transitive dependency
468- dependencyOverrides += scalametaFor3Use2_13
394+ dependencyOverrides += scalameta
469395 )
470396 .defaultAxes(VirtualAxis .jvm)
471397 .jvmPlatform(scalaVersions = Seq (scala213))
0 commit comments