Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests under Java 17 (Upgrade to Play 2.9 & update Guice) #94

Merged
merged 1 commit into from
Feb 14, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11']
java: [ '11', '17']
name: Run Tests (Java ${{ matrix.java }})
steps:
- name: Checkout
Expand Down
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,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the recommended version of scalatestplus-play for Play 2.9:

image

"com.amazonaws" % "aws-java-sdk-dynamodb" % awsVersion,
"org.mockito" % "mockito-core" % mockitoVersion % Test,
"com.typesafe.play" %% "play-test" % playVersion % Test,
Expand Down
6 changes: 2 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ 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",
Copy link
Member Author

@rtyley rtyley Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping support for Scala 2.12, as it's no longer supported by Play, as of Play v2.9.

licenses := Seq(License.Apache2),
scalacOptions := Seq("-deprecation", "-feature", "-release:8")
scalacOptions := Seq("-deprecation", "-feature", "-release:11")
)

lazy val atomPublisher = (project in file("./atom-publisher-lib"))
Expand All @@ -32,7 +31,6 @@ lazy val atomLibraries = (project in file("."))
.aggregate(atomPublisher, atomManagerPlay).settings(
publish / skip := true,
releaseVersion := ReleaseVersion.fromAggregatedAssessedCompatibilityWithLatestRelease().value,
releaseCrossBuild := true, // true if you cross-build the project for multiple Scala versions
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
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