@@ -55,7 +55,7 @@ lazy val junit = libraryDependencies += "com.novocode" % "junit-interface" % "0.
55
55
lazy val scala211 = " 2.11.12"
56
56
lazy val scala212 = " 2.12.13"
57
57
lazy val scala213 = " 2.13.5"
58
- lazy val scala30 = " 3.0.0-RC1 "
58
+ lazy val scala30 = " 3.0.0-RC2 "
59
59
60
60
lazy val compat = MultiScalaCrossProject (JSPlatform , JVMPlatform , NativePlatform )(
61
61
" compat" ,
@@ -67,16 +67,23 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform
67
67
scalacOptions ++= Seq (" -feature" , " -language:higherKinds" , " -language:implicitConversions" ),
68
68
Compile / unmanagedSourceDirectories += {
69
69
val sharedSourceDir = (ThisBuild / baseDirectory).value / " compat/src/main"
70
- if (scalaVersion.value.startsWith(" 2.13." ) || isDotty.value) sharedSourceDir / " scala-2.13"
71
- else sharedSourceDir / " scala-2.11_2.12"
70
+ CrossVersion .partialVersion(scalaVersion.value) match {
71
+ case Some ((3 , _) | (2 , 13 )) =>
72
+ sharedSourceDir / " scala-2.13"
73
+ case _ =>
74
+ sharedSourceDir / " scala-2.11_2.12"
75
+ }
72
76
},
73
77
versionScheme := Some (" early-semver" ),
74
78
versionPolicyIntention := Compatibility .BinaryCompatible ,
75
79
)
76
80
.jvmSettings(
77
81
Test / unmanagedSourceDirectories += (ThisBuild / baseDirectory).value / " compat/src/test/scala-jvm" ,
78
82
junit,
79
- scalaModuleMimaPreviousVersion := Some (" 2.4.0" ).filterNot(_ => isDotty.value),
83
+ scalaModuleMimaPreviousVersion := (CrossVersion .partialVersion(scalaVersion.value) match {
84
+ case Some ((3 , _)) => None
85
+ case _ => Some (" 2.4.0" )
86
+ }),
80
87
mimaBinaryIssueFilters ++= {
81
88
import com .typesafe .tools .mima .core ._
82
89
import com .typesafe .tools .mima .core .ProblemFilters ._
@@ -92,7 +99,10 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform
92
99
.Process (" git rev-parse HEAD" )
93
100
.lineStream_!
94
101
.head
95
- val opt = if (isDotty.value) " -scalajs-mapSourceURI" else " -P:scalajs:mapSourceURI"
102
+ val opt = CrossVersion .partialVersion(scalaVersion.value) match {
103
+ case Some ((3 , _)) => " -scalajs-mapSourceURI"
104
+ case _ => " -P:scalajs:mapSourceURI"
105
+ }
96
106
Seq (s " $opt: $x-> $y/ " )
97
107
},
98
108
Test / fork := false // Scala.js cannot run forked tests
@@ -277,8 +287,8 @@ lazy val `scalafix-tests` = project
277
287
output212Plus.value,
278
288
output213.value
279
289
),
280
- scalafixTestkitInputSourceDirectories := sourceDirectories.in (`scalafix-input`, Compile ).value,
281
- scalafixTestkitInputClasspath := fullClasspath.in (`scalafix-input`, Compile ).value
290
+ scalafixTestkitInputSourceDirectories := (`scalafix-input` / Compile / sourceDirectories ).value,
291
+ scalafixTestkitInputClasspath := (`scalafix-input` / Compile / fullClasspath ).value,
282
292
)
283
293
.dependsOn(`scalafix-input`, `scalafix-rules`)
284
294
.enablePlugins(BuildInfoPlugin , ScalafixTestkitPlugin )
0 commit comments