forked from cchantep/Reactivemongo-Play-Json
-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.sbt
67 lines (60 loc) · 1.69 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import Common.{ playVersion, driverVersion }
lazy val playJson = Def.setting {
val ver = playVersion.value
val groupId = {
if (ver startsWith "3.") {
"org.playframework"
} else {
"com.typesafe.play"
}
}
groupId %% "play-json" % ver
}
lazy val `play-json-compat` = project
.in(file("compat"))
.settings(
name := "reactivemongo-play-json-compat",
description := "Compatibility library between BSON/Play JSON",
mimaPreviousArtifacts := Set.empty[ModuleID],
Test / compile / scalacOptions ++= {
if (scalaBinaryVersion.value == "3") {
Seq("-Wconf:cat=deprecation&msg=.*jsObjectWrites.*:s")
} else {
Seq.empty
}
},
Test / compile / scalacOptions := {
val opts = (Test / compile / scalacOptions).value
val v = scalaBinaryVersion.value
if (v == "2.12" || v == "2.13") {
opts.filter(o => o != "-Xfatal-warnings" && o != "-Werror")
} else {
opts
}
},
libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-api" % "1.7.36" % Provided,
"org.reactivemongo" %% "reactivemongo-bson-api" % driverVersion.value
),
libraryDependencies += playJson.value.cross(CrossVersion.binary) % Provided,
libraryDependencies += {
val ver = {
if (scalaBinaryVersion.value startsWith "3") {
"5.5.3"
} else {
"4.10.6"
}
}
"org.specs2" %% "specs2-matcher-extra" % ver % Test
}
)
// TODO: Re-root
lazy val root = (project in file("."))
.settings(
Release.settings ++ Seq(
publish := ({}),
publishTo := None,
mimaPreviousArtifacts := Set.empty[ModuleID] // TODO
)
)
.aggregate(`play-json-compat`)