From 3c6314817e231c75bf6daa8b623b3410572b4aac Mon Sep 17 00:00:00 2001 From: OlegYch Date: Wed, 3 Jan 2024 20:15:58 +0100 Subject: [PATCH] add support for play3 --- README.md | 4 +++- build.sbt | 13 ++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index eab4dc45..ad5ec4a2 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ Here's the related technical details: | `slickpg` MacAddrString | macaddr | no 3rd party dependencies | | `slickpg` JsonString | json | no 3rd party dependencies | | `json4s` JValue | json | `json4s` v3.6.6 | -| `play-json` JsValue | json | `play-json` v2.7.4 | +| `play-json` JsValue | json | `play-json` v2.10 or v3.0 | | `spray-json` JsValue | json | `spray-json` v1.3.5 | | `argonaut json` Json | json | `argonaut` v6.2.3 | | `circe json` Json | json | `circe` v0.11.2 / v0.12.3 | @@ -220,6 +220,8 @@ libraryDependencies += "com.github.tminglei" %% "slick-pg_json4s" % "0.22.0-M4" > If you need `play-json` support, pls append dependency: ```scala libraryDependencies += "com.github.tminglei" %% "slick-pg_play-json" % "0.22.0-M4" +or +libraryDependencies += "com.github.tminglei" %% "slick-pg_play-json3" % "0.22.0-M4" ``` > If you need `spray-json` support, pls append dependency: diff --git a/build.sbt b/build.sbt index 2ff960fa..8d288e68 100644 --- a/build.sbt +++ b/build.sbt @@ -92,7 +92,7 @@ lazy val slickPg = (project in file(".")) libraryDependencies := mainDependencies(scalaVersion.value) ) .dependsOn (slickPgCore % "test->test;compile->compile") - .aggregate (slickPgCore, slickPgJoda, slickPgJson4s, slickPgJts, slickPgJtsLt, slickPgPlayJson, slickPgSprayJson, slickPgCirceJson, slickPgArgonaut, slickPgJawn) + .aggregate (slickPgCore, slickPgJoda, slickPgJson4s, slickPgJts, slickPgJtsLt, slickPgPlayJson, slickPgPlayJson3, slickPgSprayJson, slickPgCirceJson, slickPgArgonaut, slickPgJawn) lazy val slickPgJoda = (project in file("./addons/joda-time")) .settings(commonSettings) @@ -140,16 +140,19 @@ lazy val slickPgJtsLt = (project in file("./addons/jts_lt")) ) .dependsOn (slickPgCore % "test->test;compile->compile") -lazy val slickPgPlayJson = (project in file("./addons/play-json")) +def slickPgPlayJson0(play: ModuleID, suffix: String) = Project("slick-pg_play-json" + suffix, file("./addons/play-json")) .settings(commonSettings) .settings( - name := "slick-pg_play-json", - description := "Slick extensions for PostgreSQL - play-json module", + description := s"Slick extensions for PostgreSQL - play-json${suffix} module", + target := target.value / suffix, libraryDependencies := mainDependencies(scalaVersion.value) ++ - Seq("com.typesafe.play" %% "play-json" % "2.10.3") + Seq(play) ) .dependsOn (slickPgCore % "test->test;compile->compile") +lazy val slickPgPlayJson = slickPgPlayJson0("com.typesafe.play" %% "play-json" % "2.10.3", "") +lazy val slickPgPlayJson3 = slickPgPlayJson0("org.playframework" %% "play-json" % "3.0.1", "3") + lazy val slickPgSprayJson = (project in file("./addons/spray-json")) .settings(commonSettings) .settings(