Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ jobs:
uses: playframework/.github/.github/workflows/cmd.yml@v4
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
Expand Down
11 changes: 9 additions & 2 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ object Common extends AutoPlugin {
organizationHomepage := Some(uri("https://playframework.com/")),
homepage := Some(uri(s"https://github.com/playframework/${repoName}")),
licenses := Seq(License("Apache-2.0", uri("https://www.apache.org/licenses/LICENSE-2.0.html"))),
scalaVersion := Scala212,
crossScalaVersions := ScalaVersions,
scalaVersion := resolveScalaVersion(sys.props.getOrElse("scala.version", scala213Version)),
crossScalaVersions := publishedScalaVersions,
scalacOptions ++= scalacParameters,
javacOptions ++= javacParameters,
developers += Developer(
Expand All @@ -52,4 +52,11 @@ object Common extends AutoPlugin {
description := "Cachecontrol - Minimal HTTP cache management library in Scala"
)

override def projectSettings =
Seq(
scalacOptions ++= {
if (scalaVersion.value.startsWith("3.3.")) Seq("-Yfuture-lazy-vals") else Seq.empty
}
)

}
20 changes: 16 additions & 4 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,23 @@
import sbt._

object Dependencies {
val Scala212 = "2.12.21"
val Scala213 = "2.13.18"
val Scala3 = "3.3.8"
val scala212Version = "2.12.21"
val scala213Version = "2.13.18"
val scala33LTSVersion = "3.3.8"
val scala39LTSVersion = "3.9.0"
val scala3NextVersion = "3.10.0-RC2"

val ScalaVersions = Seq(Scala212, Scala213, Scala3)
val publishedScalaVersions = Seq(scala212Version, scala213Version, scala33LTSVersion)

private val scalaVersionAliases = Map(
"2.12.x" -> scala212Version,
"2.13.x" -> scala213Version,
"3.3.x" -> scala33LTSVersion,
"3.9.x" -> scala39LTSVersion,
"3.next" -> scala3NextVersion,
)

def resolveScalaVersion(version: String): String = scalaVersionAliases.getOrElse(version, version)

def scalaTest = "org.scalatest" %% "scalatest" % "3.2.20" % Test

Expand Down