diff --git a/build.sbt b/build.sbt index dfcd697..d7d42ea 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ import Dependencies._ -ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.4" +ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.5.0" libraryDependencies ++= Seq( Library.playWs, @@ -8,11 +8,11 @@ libraryDependencies ++= Seq( Library.playJsonJoda, Library.jodaTime, Library.hatPlayModels, + Library.playServer, Library.Specs2.matcherExtra % Test, - Library.Specs2.mock % Test, - Library.Specs2.core % Test, - Library.playAkkaHttpServer % Test, - Library.playTest % "compile" // Used by the MockHatServer, + Library.Specs2.mock % Test, + Library.Specs2.core % Test, + Library.playAkkaHttpServer % Test ) publishMavenStyle := true publishTo := { diff --git a/project/Dependencies.scala b/project/Dependencies.scala index ef7dbbe..9112a12 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -12,13 +12,13 @@ import sbt._ object Dependencies { object Versions { - val crossScala = Seq("2.13.3", "2.12.12") + val crossScala = Seq("2.13.5", "2.12.13") val scalaVersion = crossScala.head val playVersion = play.core.PlayVersion.current val testCommon = "0.2.3" - val jodaTime = "2.10" - val modelsVersion = "2.0.4" - val playJson = "2.9.1" + val jodaTime = "2.10.10" + val modelsVersion = "2.2.0" + val playJson = "2.9.1" } val resolvers = Seq( @@ -27,14 +27,14 @@ object Dependencies { ) object Library { - val hatPlayModels = "io.dataswift" %% "hat-play" % Versions.modelsVersion - val playWs = "com.typesafe.play" %% "play-ahc-ws" % Versions.playVersion - val playTest = "com.typesafe.play" %% "play-test" % Versions.playVersion - val playJson = "com.typesafe.play" %% "play-json" % Versions.playJson - val playJsonJoda = "com.typesafe.play" %% "play-json-joda" % Versions.playJson + val hatPlayModels = "io.dataswift" %% "hat-play" % Versions.modelsVersion + val playWs = "com.typesafe.play" %% "play-ahc-ws" % Versions.playVersion + val playServer = "com.typesafe.play" %% "play-server" % Versions.playVersion + val playJson = "com.typesafe.play" %% "play-json" % Versions.playJson + val playJsonJoda = "com.typesafe.play" %% "play-json-joda" % Versions.playJson val playAkkaHttpServer = "com.typesafe.play" %% "play-akka-http-server" % Versions.playVersion - val testCommon = "io.dataswift" %% "test-common" % Versions.testCommon - val jodaTime = "joda-time" % "joda-time" % Versions.jodaTime + val testCommon = "io.dataswift" %% "test-common" % Versions.testCommon + val jodaTime = "joda-time" % "joda-time" % Versions.jodaTime object Specs2 { private val version = "4.10.3" diff --git a/project/plugins.sbt b/project/plugins.sbt index 6650099..244b0f4 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,8 +1,7 @@ -addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.7") -addSbtPlugin("com.frugalmechanic" % "fm-sbt-s3-resolver" % "0.19.0") - resolvers += "HAT Library Artifacts Releases" at "https://s3-eu-west-1.amazonaws.com/library-artifacts-releases.hubofallthings.com" -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.19") -addSbtPlugin("io.dataswift" % "sbt-scalatools-common" % "0.2.3") -addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") +addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.7") +addSbtPlugin("com.frugalmechanic" % "fm-sbt-s3-resolver" % "0.19.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.26") +addSbtPlugin("io.dataswift" % "sbt-scalatools-common" % "0.2.3") +addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") diff --git a/src/main/scala/org/hatdex/hat/api/services/MockHatServer.scala b/src/main/scala/org/hatdex/hat/api/services/MockHatServer.scala index 07ee823..2c3e761 100644 --- a/src/main/scala/org/hatdex/hat/api/services/MockHatServer.scala +++ b/src/main/scala/org/hatdex/hat/api/services/MockHatServer.scala @@ -9,10 +9,6 @@ package org.hatdex.hat.api.services -import java.util.UUID - -import scala.io.Source._ - import akka.util.ByteString import io.dataswift.models.hat.{ EndpointData, ErrorMessage } import play.api.Logger @@ -23,6 +19,9 @@ import play.api.mvc._ import play.api.routing.sird._ import play.core.server.Server +import java.util.UUID +import scala.io.Source._ + object MockHatServer { import io.dataswift.models.hat.json.RichDataJsonFormats._