From 025934afa8abf5c2eaf4fcb04767d2f9171b760b Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Mon, 29 Jul 2024 14:36:26 +0200 Subject: [PATCH] Scala3: build with LTS, test against LTS & latest --- project/Dependencies.scala | 3 ++- project/ScalafixBuild.scala | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 92ccaa215d..dcc4af64b1 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -7,7 +7,8 @@ import sbt._ object Dependencies { val scala212 = sys.props.getOrElse("scala212.nightly", "2.12.19") val scala213 = sys.props.getOrElse("scala213.nightly", "2.13.14") - val scala3 = sys.props.getOrElse("scala3.nightly", "3.4.2") + val scala3Latest = sys.props.getOrElse("scala3.nightly", "3.4.2") + val scala3LTS = "3.3.4-RC1" val bijectionCoreV = "0.9.7" val collectionCompatV = "2.12.0" diff --git a/project/ScalafixBuild.scala b/project/ScalafixBuild.scala index afb0fd7a2a..a96df212f6 100644 --- a/project/ScalafixBuild.scala +++ b/project/ScalafixBuild.scala @@ -31,7 +31,7 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { publish / skip := true ) lazy val supportedScalaVersions = List(scala213, scala212) - lazy val buildScalaVersions = Seq(scala212, scala213, scala3) + lazy val buildScalaVersions = Seq(scala212, scala213, scala3LTS) lazy val buildScalaVersionsWithTargets: Seq[(String, TargetAxis)] = buildScalaVersions.map(sv => (sv, TargetAxis(sv))) ++ Seq(scala213, scala212).flatMap { sv => @@ -56,10 +56,14 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { } val prevVersions = previousVersions(sv).map(prev => TargetAxis(prev)) + val scala3FromScala2 = TargetAxis(scala3Latest) val xsource3 = TargetAxis(sv, xsource3 = true) (prevVersions :+ xsource3).map((sv, _)) - } :+ (scala213, TargetAxis(scala3)) + } ++ Seq( + (scala213, TargetAxis(scala3Latest)), + (scala213, TargetAxis(scala3LTS)) + ) lazy val publishLocalTransitive = taskKey[Unit]("Run publishLocal on this project and its dependencies")