Skip to content

Commit

Permalink
Merge pull request #4361 from guardian/an/scala2.13
Browse files Browse the repository at this point in the history
Upgrade to Scala 2.13
  • Loading branch information
andrew-nowak authored Nov 21, 2024
2 parents fae3473 + ca2da9f commit 985022c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ThisBuild / libraryDependencySchemes +=
"org.scala-lang.modules" %% "scala-java8-compat" % VersionScheme.Always

val commonSettings = Seq(
scalaVersion := "2.12.20",
scalaVersion := "2.13.15",
description := "grid",
organization := "com.gu",
version := "0.1",
Expand Down Expand Up @@ -75,9 +75,6 @@ val maybeBBCLib: Option[sbt.ProjectReference] = if(bbcBuildProcess) Some(bbcProj

lazy val commonLib = project("common-lib").settings(
libraryDependencies ++= Seq(
// FIXME - added temporarily to assist code compatible with scala 2.12 and 2.13
// remove ASAP after completing 2.13 upgrade!!!
"org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0",
"com.gu" %% "editorial-permissions-client" % "3.0.0",
"com.gu" %% "pan-domain-auth-play_2-8" % "7.0.0",
"com.amazonaws" % "aws-java-sdk-iam" % awsSdkVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ class FileMetadataAggregatorTest extends AnyFlatSpec with Matchers {
"xmpMM:History" -> JsArray(Seq(
JsArray(Seq(
"{'stEvt:softwareAgent':'Adobe Photoshop CC (Macintosh)'}",
"{'stEvt:when':'2018-02-06T16:36:48Z'}",
"{'stEvt:action':'created'}",
"{'stEvt:instanceID':'xmp.iid:65d63b5e-a24e-4e51-89bd-6693ce193404'}",
"{'stEvt:when':'2018-02-06T16:36:48Z'}",
).map(JsString)),
JsArray(Seq(
"{'stEvt:action':'saved'}",
Expand All @@ -167,9 +167,9 @@ class FileMetadataAggregatorTest extends AnyFlatSpec with Matchers {
JsArray(Seq(
"{'stEvt:action':'saved'}",
"{'stEvt:when':'2019-07-04T14:12:26+01:00'}",
"{'stEvt:instanceID':'xmp.iid:adbc5207-3f5b-4480-9e67-ed2a1871deb9'}",
"{'stEvt:softwareAgent':'Adobe Photoshop CC 2019 (Macintosh)'}",
"{'stEvt:changed':'/'}",
"{'stEvt:instanceID':'xmp.iid:adbc5207-3f5b-4480-9e67-ed2a1871deb9'}",
).map(JsString)),
JsArray(Seq(
"{'stEvt:parameters':'from application/vnd.adobe.photoshop to image/png'}",
Expand Down
4 changes: 2 additions & 2 deletions thrall/app/lib/elasticsearch/ElasticSearch.scala
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ class ElasticSearch(
val exportsParameter = JsDefined(Json.toJson(exports)).toOption.map { cs: JsValue => // TODO deduplicate with set collections
cs.as[JsArray].value.map { c =>
asNestedMap(c)
}
}.toSeq
}.orNull

val eventualUpdateResponse = migrationAwareUpdater(
Expand Down Expand Up @@ -673,7 +673,7 @@ class ElasticSearch(
val collectionsParameter = JsDefined(Json.toJson(collections)).toOption.map { cs: JsValue =>
cs.as[JsArray].value.map { c =>
asNestedMap(c)
}
}.toSeq
}.orNull

val eventualUpdateResponse = migrationAwareUpdater(
Expand Down

0 comments on commit 985022c

Please sign in to comment.