Skip to content

Commit

Permalink
Squashed commits: scalafix-testkit3 cross compiled for scala3
Browse files Browse the repository at this point in the history
This is the commit message scalacenter#2:

build sbt changes for test modules

This is the commit message scalacenter#3:

test modules: scalatest3V definition
  • Loading branch information
rvacaru committed Aug 25, 2022
1 parent 8eed800 commit 8495e77
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
19 changes: 11 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ lazy val testsShared = projectMatrix
coverageEnabled := false
)
.defaultAxes(VirtualAxis.jvm)
.jvmPlatform(testTargetScalaVersions)
.jvmPlatform(buildScalaVersions :+ scala3)
.disablePlugins(ScalafixPlugin)

lazy val testsInput = projectMatrix
Expand All @@ -189,7 +189,7 @@ lazy val testsInput = projectMatrix
coverageEnabled := false
)
.defaultAxes(VirtualAxis.jvm)
.jvmPlatform(testTargetScalaVersions)
.jvmPlatform(buildScalaVersions :+ scala3)
.disablePlugins(ScalafixPlugin)

lazy val testsOutput = projectMatrix
Expand All @@ -201,21 +201,24 @@ lazy val testsOutput = projectMatrix
coverageEnabled := false
)
.defaultAxes(VirtualAxis.jvm)
.jvmPlatform(testTargetScalaVersions)
.jvmPlatform(buildScalaVersions :+ scala3)
.disablePlugins(ScalafixPlugin)

lazy val testkit = projectMatrix
.in(file("scalafix-testkit"))
.settings(
moduleName := "scalafix-testkit",
isFullCrossVersion,
libraryDependencies ++= Seq(
googleDiff,
scalatest
)
libraryDependencies += googleDiff,
libraryDependencies ++= {
if (!isScala3.value)
Seq(scalatest)
else
Seq("org.scalatest" %% "scalatest" % scalatest3V)
}
)
.defaultAxes(VirtualAxis.jvm)
.jvmPlatform(buildScalaVersions)
.jvmPlatform(buildScalaVersions :+ scala3)
.dependsOn(cli)

lazy val unit = projectMatrix
Expand Down
1 change: 1 addition & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ object Dependencies {
val scalaXml211V = "1.3.0" // scala-xml stops publishing for scala 2.11
val scalametaV = "4.5.13"
val scalatestV = "3.0.8" // don't bump, to avoid forcing breaking changes on clients via eviction
val scalatest3V = "3.2.13"

val bijectionCore = "com.twitter" %% "bijection-core" % bijectionCoreV
val collectionCompat = "org.scala-lang.modules" %% "scala-collection-compat" % collectionCompatV
Expand Down
3 changes: 2 additions & 1 deletion project/ScalafixBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys {
"core3/compile" ::
"rules3/compile" ::
"reflect3/compile" ::
"cli3/compile" :: // TODO replace core rules and reflect with unit3 in the end
"cli3/compile" ::
"testkit3/compile" :: // TODO replace core rules and reflect with unit3 in the end
s
},
commands += Command.command("ci-213") { s =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package scalafix.testkit

import scala.meta._
import scala.meta.internal.inputs.XtensionInputSyntaxStructure

import scalafix.internal.reflect.RuleCompilerClasspath
import scalafix.internal.testkit.EndOfLineAssertExtractor
Expand Down

0 comments on commit 8495e77

Please sign in to comment.