From 34c196b87dcad25e571476c4150c261490738b86 Mon Sep 17 00:00:00 2001 From: Roberto Tyley Date: Wed, 28 Feb 2024 15:19:33 +0000 Subject: [PATCH 1/2] Add Play v2.9 support to aid Facia Tool upgrade Whether you get benefit from going 2.8->2.9->3.0 (over just going 2.8->3.0) is probably a factor of how big and complicated the project being upgraded is - I'd guess Facia Tool is quite big, so breaking the changes down into smaller chunks might be worth it in terms of avoiding risk. Note also that Play 2.9 actually uses Play-Json *2.10*, which is a bit surprising! See also https://github.com/guardian/maintaining-scala-projects/issues/4 --- build.sbt | 4 ++++ project/dependencies.scala | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 7de9615c..1e1ef8c0 100644 --- a/build.sbt +++ b/build.sbt @@ -27,9 +27,11 @@ val sonatypeReleaseSettings = Seq( lazy val root = (project in file(".")).aggregate( faciaJson_play27, faciaJson_play28, + faciaJson_play29, faciaJson_play30, fapiClient_play27, fapiClient_play28, + fapiClient_play29, fapiClient_play30 ).settings( publish / skip := true, @@ -77,10 +79,12 @@ def fapiClient_playJsonVersion(playJsonVersion: PlayJsonVersion) = baseProject( lazy val faciaJson_play27 = faciaJson_playJsonVersion(PlayJsonVersion.V27) lazy val faciaJson_play28 = faciaJson_playJsonVersion(PlayJsonVersion.V28) +lazy val faciaJson_play29 = faciaJson_playJsonVersion(PlayJsonVersion.V29) lazy val faciaJson_play30 = faciaJson_playJsonVersion(PlayJsonVersion.V30) lazy val fapiClient_play27 = fapiClient_playJsonVersion(PlayJsonVersion.V27).dependsOn(faciaJson_play27) lazy val fapiClient_play28 = fapiClient_playJsonVersion(PlayJsonVersion.V28).dependsOn(faciaJson_play28) +lazy val fapiClient_play29 = fapiClient_playJsonVersion(PlayJsonVersion.V29).dependsOn(faciaJson_play29) lazy val fapiClient_play30 = fapiClient_playJsonVersion(PlayJsonVersion.V30).dependsOn(faciaJson_play30) Test/testOptions += Tests.Argument( diff --git a/project/dependencies.scala b/project/dependencies.scala index 91933e7a..756e6b6b 100644 --- a/project/dependencies.scala +++ b/project/dependencies.scala @@ -1,7 +1,7 @@ import sbt._ object Dependencies { - val capiVersion = "21.0.0" + val capiVersion = "22.0.0" val awsSdk = "com.amazonaws" % "aws-java-sdk-s3" % "1.12.524" val commonsIo = "org.apache.commons" % "commons-io" % "1.3.2" @@ -27,6 +27,7 @@ object Dependencies { object PlayJsonVersion { val V27 = PlayJsonVersion("27", "com.typesafe.play", "2.7.4") val V28 = PlayJsonVersion("28", "com.typesafe.play", "2.8.2") + val V29 = PlayJsonVersion("29", "com.typesafe.play", "2.10.4", supportsScala3 = true) val V30 = PlayJsonVersion("30", "org.playframework", "3.0.1", supportsScala3 = true) } } From d17c96886205210198e65e752d8cbd75e64b19ac Mon Sep 17 00:00:00 2001 From: Roberto Tyley Date: Thu, 29 Feb 2024 09:36:15 +0000 Subject: [PATCH 2/2] Disable artifact compatibility checking for next release As https://github.com/guardian/facia-scala-client/pull/307 introduces a new artifact, unfortunately artifact compatibility checking will crash out (reporting that it can't find the previous version of the brand new artifact to check compatibility against). So, we have to disable the check for now, and then revert this change after the new artifact is released. --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 1e1ef8c0..66e53dc9 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ description := "Scala client for The Guardian's Facia JSON API" val sonatypeReleaseSettings = Seq( licenses := Seq("Apache V2" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")), - releaseVersion := fromAggregatedAssessedCompatibilityWithLatestRelease().value, + // releaseVersion := fromAggregatedAssessedCompatibilityWithLatestRelease().value, releaseCrossBuild := true, // true if you cross-build the project for multiple Scala versions releaseProcess := Seq[ReleaseStep]( checkSnapshotDependencies,