Skip to content

Commit

Permalink
Fix tests under Java 17 (Guice upgrade via Play)
Browse files Browse the repository at this point in the history
After #93 we found that
unfortunately the Release workflow failed while running the tests:

* The Release workflow uses Java 17 for all builds
* The Atom Maker library uses Play with Guice for Dependency Injection
* Guice gained Java 17 & 21 support with Guice v6:
  https://github.com/google/guice/wiki/Guice600
* Play only updated to Guice v6 (and gained general Java 17 support)
  with Play v2.9:
  playframework/playframework#11808
  playframework/playframework@10ca54d#diff-3dc52110c1c1c453c2e9740ac58fe7e90d53121875a034ef3109c34ab030c29e
  • Loading branch information
rtyley committed Jan 17, 2024
1 parent 5006764 commit 48940ac
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion atom-manager-play-lib/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name := "atom-manager-play"
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play" % playVersion,
"com.gu" %% "content-atom-model" % contentAtomVersion,
"org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0" % Test,
"org.scalatestplus.play" %% "scalatestplus-play" % "6.0.1" % Test,
"com.amazonaws" % "aws-java-sdk-dynamodb" % awsVersion,
"org.mockito" % "mockito-core" % mockitoVersion % Test,
"com.typesafe.play" %% "play-test" % playVersion % Test,
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ name := "atom-maker-lib"

lazy val artifactProductionSettings = Seq(
organization := "com.gu",
scalaVersion := "2.12.18",
crossScalaVersions := Seq(scalaVersion.value, "2.13.12"),
scalaVersion := "2.13.12",
crossScalaVersions := Seq(scalaVersion.value),
licenses := Seq(License.Apache2),
scalacOptions := Seq("-deprecation", "-feature", "-release:8")
)
Expand Down
4 changes: 2 additions & 2 deletions project/BuildVars.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ object BuildVars {
lazy val awsVersion = "1.11.8"
lazy val contentAtomVersion = "4.0.0"
lazy val scroogeVersion = "22.1.0"
lazy val playVersion = "2.8.8"
lazy val mockitoVersion = "4.8.0"
lazy val playVersion = "2.9.1"
lazy val mockitoVersion = "4.11.0"
}
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.8")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.9.1")

addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0")
Expand Down

0 comments on commit 48940ac

Please sign in to comment.