Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Commit 8992642

Browse files
authored
Merge pull request #76 from hmrc/BDOG-657b
BDOG-657 Bump reactivemongo to 0.20.2
2 parents f448f45 + 8e7a30d commit 8992642

File tree

5 files changed

+31
-14
lines changed

5 files changed

+31
-14
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ matrix:
1010
- scala: 2.12.8
1111
env: PLAY_VERSION=2.6
1212
jdk: openjdk8
13+
- scala: 2.12.8
14+
env: PLAY_VERSION=2.7
15+
jdk: openjdk8
1316

1417
notifications:
1518
email:

project/LibraryDependencies.scala

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@ import sbt._
33
object LibraryDependencies {
44

55
private val play25Version = "2.5.19"
6-
private val play26Version = "2.6.20"
6+
private val play26Version = "2.6.23" // this version is pinned, since later versions are incompatible with the version of akka that reactivemongo was build with on scala 2.11.
7+
private val play27Version = "2.7.4"
78

89
val compile: Seq[ModuleID] = PlayCrossCompilation.dependencies(
910
shared = Seq(
10-
"com.github.nscala-time" %% "nscala-time" % "2.22.0",
11-
"org.reactivemongo" %% "reactivemongo" % "0.19.7",
11+
"com.github.nscala-time" %% "nscala-time" % "2.22.0",
12+
"org.reactivemongo" %% "reactivemongo" % "0.20.2",
13+
"org.slf4j" % "slf4j-api" % "1.7.26",
14+
"org.slf4j" % "log4j-over-slf4j" % "1.7.26",
1215
// force commons-codec to avoid 1.13 and 1.14 until 1.15 is available
1316
// see JIRA ticket BDOG-612
1417
"commons-codec" % "commons-codec" % "1.12" force()
1518
),
1619
play25 = Seq(
17-
"org.slf4j" % "slf4j-api" % "1.7.26",
18-
"org.slf4j" % "log4j-over-slf4j" % "1.7.26",
1920
"com.typesafe.play" %% "play" % play25Version,
20-
"org.reactivemongo" %% "reactivemongo-play-json" % "0.19.7-play25",
21+
"org.reactivemongo" %% "reactivemongo-play-json" % "0.20.2-play25",
2122
// force dependencies due to security flaws found in jackson-databind < 2.9.x using XRay
2223
"com.fasterxml.jackson.core" % "jackson-core" % "2.9.8",
2324
"com.fasterxml.jackson.core" % "jackson-databind" % "2.9.8",
@@ -28,11 +29,14 @@ object LibraryDependencies {
2829
"xerces" % "xercesImpl" % "2.12.0"
2930
),
3031
play26 = Seq(
31-
"org.slf4j" % "slf4j-api" % "1.7.26",
32-
"org.slf4j" % "log4j-over-slf4j" % "1.7.26",
3332
"com.typesafe.play" %% "play" % play26Version,
3433
"com.typesafe.play" %% "play-guice" % play26Version,
35-
"org.reactivemongo" %% "reactivemongo-play-json" % "0.19.7-play26"
34+
"org.reactivemongo" %% "reactivemongo-play-json" % "0.20.2-play26"
35+
),
36+
play27 = Seq(
37+
"com.typesafe.play" %% "play" % play27Version,
38+
"com.typesafe.play" %% "play-guice" % play27Version,
39+
"org.reactivemongo" %% "reactivemongo-play-json" % "0.20.2-play27"
3640
)
3741
)
3842

@@ -52,6 +56,10 @@ object LibraryDependencies {
5256
play26 = Seq(
5357
"com.typesafe.play" %% "play-test" % play26Version % Test,
5458
"org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test
59+
),
60+
play27 = Seq(
61+
"com.typesafe.play" %% "play-test" % play27Version % Test,
62+
"org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test
5563
)
5664
)
5765
}

project/PlayCrossCompilation.scala

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
import uk.gov.hmrc.playcrosscompilation.AbstractPlayCrossCompilation
2-
import uk.gov.hmrc.playcrosscompilation.PlayVersion.Play25
2+
import uk.gov.hmrc.playcrosscompilation.PlayVersion
33

4-
object PlayCrossCompilation extends AbstractPlayCrossCompilation(defaultPlayVersion = Play25)
4+
object PlayCrossCompilation extends AbstractPlayCrossCompilation(defaultPlayVersion = PlayVersion.Play25) {
5+
override def playCrossScalaBuilds(scalaVersions: Seq[String]): Seq[String] =
6+
playVersion match {
7+
case PlayVersion.Play25 => scalaVersions.filter(version => version.startsWith("2.11"))
8+
case PlayVersion.Play26 => scalaVersions
9+
case PlayVersion.Play27 => // reactivemongo uses an old akka-version which is incompatible with the latter version of akka used in play 2.7. on scala 2.11
10+
scalaVersions.filter(version => version.startsWith("2.12"))
11+
}
12+
}

src/main/scala/reactivemongo/ReactiveMongoHelper.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ package reactivemongo
1818

1919
import reactivemongo.core.nodeset.Authenticate
2020

21-
import scala.concurrent.{Await, ExecutionContext, Future}
21+
import scala.concurrent.{Await, ExecutionContext}
2222
import reactivemongo.api._
2323

2424
import scala.concurrent.duration._
25-
import scala.language.postfixOps
2625

2726
object ReactiveMongoHelper {
2827

src/main/scala/uk/gov/hmrc/mongo/SimpleMongoConnection.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package uk.gov.hmrc.mongo
1919
import reactivemongo.api.FailoverStrategy
2020

2121
import scala.concurrent.duration.FiniteDuration
22-
import scala.language.postfixOps
2322

2423
trait SimpleMongoConnection {
2524

0 commit comments

Comments
 (0)