Skip to content

Commit

Permalink
Allow building under Java 21 LTS
Browse files Browse the repository at this point in the history
See guardian/scala-steward-public-repos#68 ...
we're now running our Scala Steward workflow with Java 21 LTS, which
means that all projects that want to have Scala Steward updates (like
https://github.com/guardian/mobile-save-for-later) need to be able
to build under Java 21 (even if the projects are still _running_ in
production on Java 8).

Being able to build with Java 21 requires using recent versions of
Scala (2.12.18+) and sbt (1.9.0+):

https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html#jdk-21-compatibility-notes
  • Loading branch information
rtyley committed Mar 14, 2024
1 parent 60b967e commit 67d16a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import scala.collection.immutable

val testAndCompileDependencies: String = "test->test;compile->compile"

ThisBuild / libraryDependencySchemes +=
"org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always // due to Identity using lift-json

def projectMaker(projectName: String) = Project(projectName, file(projectName))
.enablePlugins(RiffRaffArtifact)
.settings(
Expand All @@ -27,9 +30,7 @@ def commonAssemblySettings(module: String): immutable.Seq[Def.Setting[_]] =

val commonSettings: immutable.Seq[Def.Setting[_]] = List(
fork := true, // was hitting deadlock, fxxund similar complaints online, disabling concurrency helps: https://github.com/sbt/sbt/issues/3022, https://github.com/mockito/mockito/issues/1067
resolvers ++= Seq(
Resolver.sonatypeRepo("releases")
),
resolvers ++= Resolver.sonatypeOssRepos("releases"),
libraryDependencies ++= Seq(
awsLambda,
awsDynamo,
Expand Down Expand Up @@ -62,7 +63,7 @@ val commonSettings: immutable.Seq[Def.Setting[_]] = List(
),
organization := "com.gu",
version := "1.0",
scalaVersion := "2.12.5",
scalaVersion := "2.12.19",
scalacOptions ++= Seq(
"-deprecation",
"-encoding",
Expand Down
3 changes: 2 additions & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sbt.version=1.6.1
sbt.version=1.9.9

0 comments on commit 67d16a6

Please sign in to comment.