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

BDOG-657 Bump reactivemongo to 0.20.2 #76

Merged
merged 2 commits into from
Mar 16, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ matrix:
- scala: 2.12.8
env: PLAY_VERSION=2.6
jdk: openjdk8
- scala: 2.12.8
env: PLAY_VERSION=2.7
jdk: openjdk8

notifications:
email:
Expand Down
26 changes: 17 additions & 9 deletions project/LibraryDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@ import sbt._
object LibraryDependencies {

private val play25Version = "2.5.19"
private val play26Version = "2.6.20"
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.
private val play27Version = "2.7.4"

val compile: Seq[ModuleID] = PlayCrossCompilation.dependencies(
shared = Seq(
"com.github.nscala-time" %% "nscala-time" % "2.22.0",
"org.reactivemongo" %% "reactivemongo" % "0.19.7",
"com.github.nscala-time" %% "nscala-time" % "2.22.0",
"org.reactivemongo" %% "reactivemongo" % "0.20.2",
"org.slf4j" % "slf4j-api" % "1.7.26",
"org.slf4j" % "log4j-over-slf4j" % "1.7.26",
// force commons-codec to avoid 1.13 and 1.14 until 1.15 is available
// see JIRA ticket BDOG-612
"commons-codec" % "commons-codec" % "1.12" force()
),
play25 = Seq(
"org.slf4j" % "slf4j-api" % "1.7.26",
"org.slf4j" % "log4j-over-slf4j" % "1.7.26",
"com.typesafe.play" %% "play" % play25Version,
"org.reactivemongo" %% "reactivemongo-play-json" % "0.19.7-play25",
"org.reactivemongo" %% "reactivemongo-play-json" % "0.20.2-play25",
// force dependencies due to security flaws found in jackson-databind < 2.9.x using XRay
"com.fasterxml.jackson.core" % "jackson-core" % "2.9.8",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.9.8",
Expand All @@ -28,11 +29,14 @@ object LibraryDependencies {
"xerces" % "xercesImpl" % "2.12.0"
),
play26 = Seq(
"org.slf4j" % "slf4j-api" % "1.7.26",
"org.slf4j" % "log4j-over-slf4j" % "1.7.26",
"com.typesafe.play" %% "play" % play26Version,
"com.typesafe.play" %% "play-guice" % play26Version,
"org.reactivemongo" %% "reactivemongo-play-json" % "0.19.7-play26"
"org.reactivemongo" %% "reactivemongo-play-json" % "0.20.2-play26"
),
play27 = Seq(
"com.typesafe.play" %% "play" % play27Version,
"com.typesafe.play" %% "play-guice" % play27Version,
"org.reactivemongo" %% "reactivemongo-play-json" % "0.20.2-play27"
)
)

Expand All @@ -52,6 +56,10 @@ object LibraryDependencies {
play26 = Seq(
"com.typesafe.play" %% "play-test" % play26Version % Test,
"org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test
),
play27 = Seq(
"com.typesafe.play" %% "play-test" % play27Version % Test,
"org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test
)
)
}
12 changes: 10 additions & 2 deletions project/PlayCrossCompilation.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import uk.gov.hmrc.playcrosscompilation.AbstractPlayCrossCompilation
import uk.gov.hmrc.playcrosscompilation.PlayVersion.Play25
import uk.gov.hmrc.playcrosscompilation.PlayVersion

object PlayCrossCompilation extends AbstractPlayCrossCompilation(defaultPlayVersion = Play25)
object PlayCrossCompilation extends AbstractPlayCrossCompilation(defaultPlayVersion = PlayVersion.Play25) {
override def playCrossScalaBuilds(scalaVersions: Seq[String]): Seq[String] =
playVersion match {
case PlayVersion.Play25 => scalaVersions.filter(version => version.startsWith("2.11"))
case PlayVersion.Play26 => scalaVersions
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
scalaVersions.filter(version => version.startsWith("2.12"))
}
}
3 changes: 1 addition & 2 deletions src/main/scala/reactivemongo/ReactiveMongoHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ package reactivemongo

import reactivemongo.core.nodeset.Authenticate

import scala.concurrent.{Await, ExecutionContext, Future}
import scala.concurrent.{Await, ExecutionContext}
import reactivemongo.api._

import scala.concurrent.duration._
import scala.language.postfixOps

object ReactiveMongoHelper {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package uk.gov.hmrc.mongo
import reactivemongo.api.FailoverStrategy

import scala.concurrent.duration.FiniteDuration
import scala.language.postfixOps

trait SimpleMongoConnection {

Expand Down