diff --git a/build.sbt b/build.sbt index bc822a9d3..de361cf9d 100644 --- a/build.sbt +++ b/build.sbt @@ -30,8 +30,11 @@ lazy val interfaces = project props.put("scalafixVersion", version.value) props.put("scalafixStableVersion", stableVersion.value) props.put("scalametaVersion", scalametaV) - props.put("scala213", scala213) props.put("scala212", scala212) + props.put("scala213", scala213) + props.put("scala33", scala33) + props.put("scala35", scala35) + props.put("scala36", scala36) props.put("scala3LTS", scala3LTS) props.put("scala3Next", scala3Next) val out = diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 20f08452a..506f69b29 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -7,8 +7,11 @@ import sbt._ object Dependencies { val scala212 = sys.props.getOrElse("scala212.nightly", "2.12.20") val scala213 = sys.props.getOrElse("scala213.nightly", "2.13.15") - val scala3Next = sys.props.getOrElse("scala3.nightly", "3.5.2") - val scala3LTS = "3.3.4" + val scala33 = "3.3.4" + val scala35 = "3.5.2" + val scala36 = "3.6.2" + val scala3LTS = scala33 + val scala3Next = sys.props.getOrElse("scala3.nightly", scala36) val bijectionCoreV = "0.9.8" val collectionCompatV = "2.12.0" diff --git a/project/Mima.scala b/project/Mima.scala index 624f53b3d..8da382a07 100644 --- a/project/Mima.scala +++ b/project/Mima.scala @@ -9,7 +9,10 @@ object Mima { ProblemFilters.exclude[Problem]("scalafix.internal.*"), ProblemFilters.exclude[Problem]("scala.meta.internal.*"), // Exceptions - ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.v0.Signature#Self.syntax") + ProblemFilters.exclude[DirectMissingMethodProblem]("scalafix.v0.Signature#Self.syntax"), + ProblemFilters.exclude[ReversedMissingMethodProblem]("scalafix.interfaces.Scalafix.scala33"), + ProblemFilters.exclude[ReversedMissingMethodProblem]("scalafix.interfaces.Scalafix.scala35"), + ProblemFilters.exclude[ReversedMissingMethodProblem]("scalafix.interfaces.Scalafix.scala36") ) } } diff --git a/project/ScalafixBuild.scala b/project/ScalafixBuild.scala index e7cfc7f79..2abfa7240 100644 --- a/project/ScalafixBuild.scala +++ b/project/ScalafixBuild.scala @@ -33,7 +33,14 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { // https://github.com/scalameta/scalameta/issues/2485 lazy val coreScalaVersions = Seq(scala212, scala213) - lazy val cliScalaVersions = Seq(scala212, scala213, scala3LTS, scala3Next) + lazy val cliScalaVersions = Seq( + scala212, + scala213, + scala33, + scala35, + scala36, + scala3Next + ).distinct lazy val cliScalaVersionsWithTargets: Seq[(String, TargetAxis)] = cliScalaVersions.map(sv => (sv, TargetAxis(sv))) ++ Seq(scala213, scala212).flatMap { sv => @@ -138,6 +145,9 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { "supportedScalaVersions" -> cliScalaVersions, "scala212" -> scala212, "scala213" -> scala213, + "scala33" -> scala33, + "scala35" -> scala35, + "scala36" -> scala36, "scala3LTS" -> scala3LTS, "scala3Next" -> scala3Next, sbtVersion @@ -231,7 +241,8 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { ) private val PreviousScalaVersion: Map[String, String] = Map( - "3.5.2" -> "3.5.1" + "3.5.2" -> "3.5.1", + "3.6.2" -> "3.5.1" ) override def buildSettings: Seq[Setting[_]] = List( diff --git a/scalafix-cli/src/main/scala/scalafix/internal/interfaces/ScalafixImpl.scala b/scalafix-cli/src/main/scala/scalafix/internal/interfaces/ScalafixImpl.scala index 9ca06f82d..2b922d4d5 100644 --- a/scalafix-cli/src/main/scala/scalafix/internal/interfaces/ScalafixImpl.scala +++ b/scalafix-cli/src/main/scala/scalafix/internal/interfaces/ScalafixImpl.scala @@ -34,6 +34,12 @@ final class ScalafixImpl extends Scalafix { Versions.scala212 override def scala213(): String = Versions.scala213 + override def scala33(): String = + Versions.scala33 + override def scala35(): String = + Versions.scala35 + override def scala36(): String = + Versions.scala36 override def scala3LTS(): String = Versions.scala3LTS override def scala3Next(): String = diff --git a/scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java b/scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java index a8059e6ed..a731a5d4c 100644 --- a/scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java +++ b/scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java @@ -70,6 +70,21 @@ public interface Scalafix { */ String scala213(); + /** + * The Scala 3.3 version in {@link #supportedScalaVersions()} + */ + String scala33(); + + /** + * The Scala 3.5 version in {@link #supportedScalaVersions()} + */ + String scala35(); + + /** + * The Scala 3.6 version in {@link #supportedScalaVersions()} + */ + String scala36(); + /** * The Scala 3 LTS version in {@link #supportedScalaVersions()} */ @@ -135,7 +150,11 @@ static Scalafix fetchAndClassloadInstance(String requestedScalaVersion, List