diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index a97649b..d620755 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -15,7 +15,7 @@ concurrency: jobs: check-code-style: name: Code Style - uses: playframework/.github/.github/workflows/cmd.yml@v4 + uses: playframework/.github/.github/workflows/cmd.yml@unblock-repo_scala_sbt_org with: cmd: sbt validateCode @@ -23,15 +23,16 @@ jobs: name: Tests needs: - "check-code-style" - uses: playframework/.github/.github/workflows/cmd.yml@v4 + uses: playframework/.github/.github/workflows/cmd.yml@unblock-repo_scala_sbt_org with: java: 21, 17 - scala: 2.12.x, 2.13.x, 3.x - cmd: sbt "++$MATRIX_SCALA ; test" + # Symbolic lanes resolve to exact versions in project/Dependencies.scala. + scala: 2.12.x, 2.13.x, 3.3.x, 3.9.x, 3.next + cmd: sbt -Dscala.version=$MATRIX_SCALA testFull finish: name: Finish if: github.event_name == 'pull_request' needs: # Should be last - "tests" - uses: playframework/.github/.github/workflows/rtm.yml@v4 + uses: playframework/.github/.github/workflows/rtm.yml@unblock-repo_scala_sbt_org diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ded11b2..2891ae5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,5 +9,5 @@ on: jobs: publish-artifacts: name: Publish / Artifacts - uses: playframework/.github/.github/workflows/publish.yml@v4 + uses: playframework/.github/.github/workflows/publish.yml@unblock-repo_scala_sbt_org secrets: inherit diff --git a/build.sbt b/build.sbt index 237c3ca..763e581 100644 --- a/build.sbt +++ b/build.sbt @@ -4,6 +4,10 @@ import sbtheader.HeaderPlugin.autoImport.HeaderPattern.commentBetween import sbtheader.CommentStyle import sbtheader.FileType import sbtheader.LineCommentCreator +import Dependencies._ + +ThisBuild / resolvers += Resolver.sonatypeCentralSnapshots + // Customise sbt-dynver's behaviour to make it work with tags which aren't v-prefixed (ThisBuild / dynverVTagPrefix) := false @@ -22,7 +26,8 @@ lazy val `play-doc` = (project in file(".")) organizationHomepage := Some(uri("https://playframework.com")), homepage := Some(uri(s"https://github.com/playframework/${Omnidoc.repoName}")), licenses := Seq("Apache-2.0" -> uri("https://www.apache.org/licenses/LICENSE-2.0.html")), - crossScalaVersions := Seq("2.12.21", "2.13.18", "3.9.0"), + scalaVersion := resolveScalaVersion(sys.props.getOrElse("scala.version", scala213Version)), + crossScalaVersions := publishedScalaVersions, exportJars := false, developers += Developer( "playframework", @@ -90,7 +95,7 @@ scalacOptions ++= Seq( "-unchecked", "-encoding", "utf8" -) +) ++ (if (scalaVersion.value.startsWith("3.3.")) Seq("-Yfuture-lazy-vals") else Seq.empty) addCommandAlias( "validateCode", diff --git a/project/Dependencies.scala b/project/Dependencies.scala new file mode 100644 index 0000000..6e87d62 --- /dev/null +++ b/project/Dependencies.scala @@ -0,0 +1,23 @@ +/* + * Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc. + */ + +object Dependencies { + val scala212Version = "2.12.21" + val scala213Version = "2.13.18" + val scala3Version = "3.3.8" + val scala39LTSVersion = "3.9.0" + val scala3NextVersion = "3.10.0-RC2" + + val publishedScalaVersions = Seq(scala212Version, scala213Version, scala3Version) + + private val scalaVersionAliases = Map( + "2.12.x" -> scala212Version, + "2.13.x" -> scala213Version, + "3.3.x" -> scala3Version, + "3.9.x" -> scala39LTSVersion, + "3.next" -> scala3NextVersion, + ) + + def resolveScalaVersion(version: String): String = scalaVersionAliases.getOrElse(version, version) +} diff --git a/project/build.properties b/project/build.properties index d75cc0e..a31b922 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1,3 +1,3 @@ # Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc. -sbt.version=2.0.8 +sbt.version=2.1.0-bin-20260918-2ef94e0-NIGHTLY diff --git a/project/plugins.sbt b/project/plugins.sbt index 54edfd5..0d5af0b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,8 @@ // Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc. -addSbtPlugin("org.playframework.twirl" % "sbt-twirl" % "2.1.0-M9") +resolvers += Resolver.sonatypeCentralSnapshots + +addSbtPlugin("org.playframework.twirl" % "sbt-twirl" % "2.1.0-M9+123-dae60cad-SNAPSHOT") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.6.2") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.12.1") addSbtPlugin("com.github.sbt" % "sbt-header" % "5.11.0")