From 87c280acff983d35df14d65f54301a66014daabb Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Mon, 15 Jun 2026 15:10:17 +0000 Subject: [PATCH 1/4] Update sbt to 2.0.0 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 7c1916d..666624a 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.12.12 +sbt.version=2.0.0 From 547813481eaa8c962f52d72300402ee9d9ccd2dc Mon Sep 17 00:00:00 2001 From: Matt Dziuban Date: Tue, 16 Jun 2026 12:44:46 -0400 Subject: [PATCH 2/4] Update build. --- build.sbt | 34 +++++++++++----------- project/Build.scala | 71 ++++++++++++++++++++++----------------------- project/plugins.sbt | 2 -- 3 files changed, 51 insertions(+), 56 deletions(-) diff --git a/build.sbt b/build.sbt index c085e20..4ce8583 100644 --- a/build.sbt +++ b/build.sbt @@ -24,15 +24,15 @@ ThisBuild / githubWorkflowBuild := Seq( ) lazy val core = simpleProj(projectMatrix.in(file("core")), "core", List( - Platform.Jvm, - Platform.Js, - Platform.Native, + BuildPlatform.Jvm, + BuildPlatform.Js, + BuildPlatform.Native, )) .settings(publishSettings) .settings( libraryDependencies ++= Seq( - catsCore.value % Optional, - izumiReflect.value, + catsCore % Optional, + izumiReflect, ), Compile / sourceGenerators += Def.task { val generators = new File("git rev-parse --show-toplevel".!!.trim) / "generators" @@ -53,8 +53,8 @@ lazy val core = simpleProj(projectMatrix.in(file("core")), "core", List( lazy val http4s = http4sProj(projectMatrix.in(file("http4s")), "http4s")(axis => _ => _.settings( libraryDependencies ++= Seq( - axis.dep("core").value, - axis.dep("dsl").value, + axis.dep("core"), + axis.dep("dsl"), ) )) .settings(publishSettings) @@ -62,12 +62,12 @@ lazy val http4s = http4sProj(projectMatrix.in(file("http4s")), "http4s")(axis => .dependsOn(core % "compile->compile;test->test") lazy val play = playProj(projectMatrix.in(file("play")), "play")(axis => _ => _.settings( - libraryDependencies ++= Seq(axis.dep("play").value), + libraryDependencies ++= Seq(axis.dep("play")), )) .settings(publishSettings) .dependsOn(core % "compile->compile;test->test") -lazy val bench = http4sProj(projectMatrix.in(file("bench")), "bench", _ => List(Platform.Jvm))( +lazy val bench = http4sProj(projectMatrix.in(file("bench")), "bench", _ => List(BuildPlatform.Jvm))( _ => sjsNowarnGlobalECSettings, ) .settings(noPublishSettings) @@ -82,11 +82,11 @@ def http4sImplDoc(dir: File, axis: Http4sAxis.Value): (File, String) = def playDepString(axis: PlayAxis.Value): String = s""""bondlink" %% "routing-play_${axis.suffix}" % "$currentVersion"""" -lazy val docs = http4sProj(projectMatrix.in(file("routing-docs")), "routing-docs", _ => List(Platform.Jvm))( +lazy val docs = http4sProj(projectMatrix.in(file("routing-docs")), "routing-docs", _ => List(BuildPlatform.Jvm))( axis => _ => _.settings( scalacOptions -= "-Werror", mdocVariables ++= { - val playAxisDeps = PlayAxis.all.map(_.dep("fake")).join.value + val playAxisDeps = PlayAxis.all.map(_.dep("fake")) Map( "VERSION" -> currentVersion, "GITHUB_REPO_URL" -> githubRepoUrl, @@ -143,22 +143,22 @@ publishDocsSite := Def.taskDyn { ) }.value -lazy val example = http4sProj(projectMatrix.in(file("example")), "example", _ => List(Platform.Jvm))( +lazy val example = http4sProj(projectMatrix.in(file("example")), "example", _ => List(BuildPlatform.Jvm))( axis => sjsNowarnGlobalECSettings.andThen(_.andThen(_.settings( libraryDependencies ++= Seq( - axis.dep("circe").value, - axis.dep("ember-server").value, + axis.dep("circe"), + axis.dep("ember-server"), ), dependencyOverrides ++= Seq( - axis.dep("core").value + axis.dep("core") ), ))), ) .settings(noPublishSettings) .settings( libraryDependencies ++= Seq( - circeDep("core").value, - circeDep("generic").value, + circeDep("core"), + circeDep("generic"), "org.slf4j" % "slf4j-api" % "2.0.18", "org.slf4j" % "slf4j-simple" % "2.0.18" ) diff --git a/project/Build.scala b/project/Build.scala index 95ef571..5293f89 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -2,11 +2,8 @@ package routing import com.typesafe.tools.mima.plugin.MimaPlugin.autoImport.{mimaFailOnNoPrevious, mimaPreviousArtifacts} import java.io.File -import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._ import sbt._ import sbt.Keys._ -import sbt.internal.ProjectMatrix -import sbtprojectmatrix.ProjectMatrixPlugin.autoImport._ import sbts3publish.S3PublishPlugin.autoImport.{s3PublishBucket, s3Release} import scala.sys.process._ @@ -14,7 +11,7 @@ object Build { lazy val currentVersion = "5.1.0" lazy val scalaVersions = Seq("2.13.18", "3.3.8") lazy val latestScalaV = scalaVersions.find(_.startsWith("3.")).get - lazy val kindProjector = compilerPlugin("org.typelevel" % "kind-projector" % "0.13.4" cross CrossVersion.full) + lazy val kindProjector = compilerPlugin(("org.typelevel" % "kind-projector" % "0.13.4").cross(CrossVersion.full)) def profileTraceOpts(baseDir: File, name: String): Seq[String] = { val dir = baseDir / ".traces" @@ -98,7 +95,7 @@ object Build { publish / skip := false, s3PublishBucket := "bondlink-maven-repo", resolvers += "bondlink-maven-repo" at "https://maven.bondlink-cdn.com", - mimaPreviousArtifacts := Set(organization.value %%% (moduleName.value match { + mimaPreviousArtifacts := Set(organization.value %% (moduleName.value match { case s if s.startsWith(s"routing-http4s_$http4sV1Milestone") => s"routing-http4s_${http4sV1Milestone.toLowerCase}44" case s => s }) % "5.0.0"), @@ -112,32 +109,32 @@ object Build { mimaFailOnNoPrevious := false, ) - sealed abstract class Platform(val s: String) - object Platform { - case object Jvm extends Platform("jvm") - case object Js extends Platform("js") - case object Native extends Platform("native") + sealed abstract class BuildPlatform(val s: String) + object BuildPlatform { + case object Jvm extends BuildPlatform("jvm") + case object Js extends BuildPlatform("js") + case object Native extends BuildPlatform("native") } - type ProjSettings = Platform => Project => Project + type ProjSettings = BuildPlatform => Project => Project def nativeProj(f: Project => Project): Project => Project = f.andThen(_.enablePlugins(scala.scalanative.sbtplugin.ScalaNativePlugin)) val sjsNowarnGlobalECSettings: ProjSettings = _ match { - case Platform.Js => _.settings(scalacOptions += "-P:scalajs:nowarnGlobalExecutionContext") - case Platform.Jvm | Platform.Native => identity + case BuildPlatform.Js => _.settings(scalacOptions += "-P:scalajs:nowarnGlobalExecutionContext") + case BuildPlatform.Jvm | BuildPlatform.Native => identity } def sjsProj(f: Project => Project): Project => Project = f.andThen(_.enablePlugins(org.scalajs.sbtplugin.ScalaJSPlugin)) - def platformAxes(platforms: List[Platform]): List[(Platform, VirtualAxis)] = + def platformAxes(platforms: List[BuildPlatform]): List[(BuildPlatform, VirtualAxis)] = platforms.map { - case p @ Platform.Jvm => (p, VirtualAxis.jvm) - case p @ Platform.Js => (p, VirtualAxis.js) - case p @ Platform.Native => (p, VirtualAxis.native) + case p @ BuildPlatform.Jvm => (p, VirtualAxis.jvm) + case p @ BuildPlatform.Js => (p, VirtualAxis.js) + case p @ BuildPlatform.Native => (p, VirtualAxis.native) } def baseProj(matrix: ProjectMatrix, nme: String) = @@ -153,16 +150,16 @@ object Build { )) platform match { - case Platform.Jvm => base - case Platform.Js => sjsProj(base) - case Platform.Native => nativeProj(base) + case BuildPlatform.Jvm => base + case BuildPlatform.Js => sjsProj(base) + case BuildPlatform.Native => nativeProj(base) } } def simpleProj( matrix: ProjectMatrix, nme: String, - platforms: List[Platform], + platforms: List[BuildPlatform], extraSettings: ProjSettings = _ => identity, ) = platformAxes(platforms).foldLeft(baseProj(matrix, nme)) { case (acc, (platform, axis)) => @@ -174,7 +171,7 @@ object Build { } def axesProj[V](matrix: ProjectMatrix, nme: String, axes: List[V])( - platforms: V => List[Platform], + platforms: V => List[BuildPlatform], extraSettings: V => ProjSettings, )(implicit va: V => VirtualAxis) = axes @@ -191,9 +188,9 @@ object Build { case class LibAxesProj[V](axes: List[V])( suffix: V => String, - defaultPlatforms: V => List[Platform], + defaultPlatforms: V => List[BuildPlatform], ) { - def apply(matrix: ProjectMatrix, nme: String, platforms: V => List[Platform] = defaultPlatforms)( + def apply(matrix: ProjectMatrix, nme: String, platforms: V => List[BuildPlatform] = defaultPlatforms)( settings: V => ProjSettings, )(implicit va: V => VirtualAxis) = axesProj(matrix, nme, axes)( @@ -221,30 +218,30 @@ object Build { } val defaultHttp4sPlatforms = (_: Http4sAxis.Value) match { - case Http4sAxis.v0_23 | Http4sAxis.v1_0_0_M46 => List(Platform.Jvm, Platform.Js) + case Http4sAxis.v0_23 | Http4sAxis.v1_0_0_M46 => List(BuildPlatform.Jvm, BuildPlatform.Js) } lazy val http4sProj = LibAxesProj(Http4sAxis.all)(_.suffix, defaultHttp4sPlatforms) - val defaultPlayPlatforms = (_: PlayAxis.Value) => List(Platform.Jvm) + val defaultPlayPlatforms = (_: PlayAxis.Value) => List(BuildPlatform.Jvm) lazy val playProj = LibAxesProj(PlayAxis.all)(_.suffix, defaultPlayPlatforms) val scalacheckVersion = "1.19.0" - val scalacheckDep = Def.setting("org.scalacheck" %%% "scalacheck" % scalacheckVersion) + val scalacheckDep = "org.scalacheck" %% "scalacheck" % scalacheckVersion val testSettings = Seq( - libraryDependencies += scalacheckDep.value % "test", + libraryDependencies += scalacheckDep % Test, Test / testOptions ++= Seq(Tests.Argument(TestFrameworks.ScalaCheck, "-verbosity", "2")) ++ Option(System.getProperty("testIterations")).map(_.toInt) .map(n => Seq(Tests.Argument(TestFrameworks.ScalaCheck, "-minSuccessfulTests", n.toString))) .getOrElse(Seq()) ) - val catsCore = Def.setting("org.typelevel" %%% "cats-core" % "2.13.0") - val izumiReflect = Def.setting("dev.zio" %%% "izumi-reflect" % "3.0.9") + val catsCore = "org.typelevel" %% "cats-core" % "2.13.0" + val izumiReflect = "dev.zio" %% "izumi-reflect" % "3.0.9" val http4sV1Milestone = "1.0.0-M" object Http4sAxis extends Enumeration { - protected case class HAVal(suffix: String, dep: String => Def.Initialize[ModuleID], comment: String) extends super.Val { self => + protected case class HAVal(suffix: String, dep: String => ModuleID, comment: String) extends super.Val { self => lazy val axis: VirtualAxis.WeakAxis = new VirtualAxis.WeakAxis { val suffix = self.suffix @@ -256,14 +253,14 @@ object Build { implicit def valueToHAVal(v: Value): HAVal = v.asInstanceOf[HAVal] implicit def valueToVirtualAxis(v: Value): VirtualAxis.WeakAxis = v.axis - val v0_23 = HAVal("0.23", proj => Def.setting("org.http4s" %%% s"http4s-$proj" % "0.23.34"), "latest stable on cats effect 3") - val v1_0_0_M46 = HAVal(s"${http4sV1Milestone}46", proj => Def.setting("org.http4s" %%% s"http4s-$proj" % "1.0.0-M46"), "latest development on cats effect 3") + val v0_23 = HAVal("0.23", proj => "org.http4s" %% s"http4s-$proj" % "0.23.34", "latest stable on cats effect 3") + val v1_0_0_M46 = HAVal(s"${http4sV1Milestone}46", proj => "org.http4s" %% s"http4s-$proj" % "1.0.0-M46", "latest development on cats effect 3") lazy val all = values.toList } object PlayAxis extends Enumeration { - protected case class PAVal(suffix: String, dep: String => Def.Initialize[ModuleID]) extends super.Val { self => + protected case class PAVal(suffix: String, dep: String => ModuleID) extends super.Val { self => lazy val axis: VirtualAxis.WeakAxis = new VirtualAxis.WeakAxis { val suffix = self.suffix @@ -275,11 +272,11 @@ object Build { implicit def valueToPAVal(v: Value): PAVal = v.asInstanceOf[PAVal] implicit def valueToVirtualAxis(v: Value): VirtualAxis.WeakAxis = v.axis - val v3_0 = PAVal("3.0", proj => Def.setting("org.playframework" %%% proj % "3.0.11")) - val v2_9 = PAVal("2.9", proj => Def.setting("com.typesafe.play" %%% proj % "2.9.11")) + val v3_0 = PAVal("3.0", proj => "org.playframework" %% proj % "3.0.11") + val v2_9 = PAVal("2.9", proj => "com.typesafe.play" %% proj % "2.9.11") lazy val all = values.toList } - def circeDep(proj: String) = Def.setting("io.circe" %%% s"circe-$proj" % "0.14.15") + def circeDep(proj: String) = "io.circe" %% s"circe-$proj" % "0.14.15" } diff --git a/project/plugins.sbt b/project/plugins.sbt index 3972c36..1acfc62 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,10 +1,8 @@ resolvers += "bondlink-maven-repo" at "https://maven.bondlink-cdn.com" addSbtPlugin("bondlink" % "sbt-s3-publish" % "0.0.1") -addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.11.0") addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.30.0") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.6") -addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.21.0") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.12") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.9.0" ) From 9a6fd906a01552cb79ffb31ae7238574e9ec6551 Mon Sep 17 00:00:00 2001 From: Matt Dziuban Date: Tue, 16 Jun 2026 12:46:45 -0400 Subject: [PATCH 3/4] Drop java 11. --- .github/workflows/ci.yml | 16 ++-------------- build.sbt | 2 +- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e43a5b..f9574ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,12 +23,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - scala: [2.12.21] - java: - - temurin@11 - - temurin@17 - - temurin@21 - - temurin@25 + scala: [3.8.4] + java: [temurin@17, temurin@21, temurin@25] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -36,14 +32,6 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@11) - if: matrix.java == 'temurin@11' - uses: actions/setup-java@v5 - with: - distribution: temurin - java-version: 11 - cache: sbt - - name: Setup Java (temurin@17) if: matrix.java == 'temurin@17' uses: actions/setup-java@v5 diff --git a/build.sbt b/build.sbt index 4ce8583..60c4b4d 100644 --- a/build.sbt +++ b/build.sbt @@ -7,7 +7,7 @@ Global / onChangedBuildSource := ReloadOnSourceChanges noPublishSettings // GitHub Actions config -val javaVersions = Seq(11, 17, 21, 25).map(v => JavaSpec.temurin(v.toString)) +val javaVersions = Seq(17, 21, 25).map(v => JavaSpec.temurin(v.toString)) ThisBuild / githubWorkflowJavaVersions := javaVersions ThisBuild / githubWorkflowArtifactUpload := false From 1390c850425e6a37cb5668507493e434b28c1be0 Mon Sep 17 00:00:00 2001 From: Matt Dziuban Date: Wed, 17 Jun 2026 08:26:45 -0400 Subject: [PATCH 4/4] Use `githubWorkflowUseSbtThinClient` to fix `githubWorkflowCheck` step. --- .github/workflows/ci.yml | 2 +- build.sbt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9574ff..9efb721 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: uses: sbt/setup-sbt@v1 - name: Check that workflows are up to date - run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck + run: sbt --client '++ ${{ matrix.scala }}; githubWorkflowCheck' - name: Build project run: sbt test diff --git a/build.sbt b/build.sbt index 60c4b4d..4d88fa0 100644 --- a/build.sbt +++ b/build.sbt @@ -14,6 +14,7 @@ ThisBuild / githubWorkflowArtifactUpload := false ThisBuild / githubWorkflowBuildMatrixFailFast := Some(false) ThisBuild / githubWorkflowTargetBranches := Seq("master") ThisBuild / githubWorkflowPublishTargetBranches := Seq() +ThisBuild / githubWorkflowUseSbtThinClient := true def isJava(v: Int) = s"matrix.java == '${javaVersions.find(_.version == v.toString).get.render}'"