-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
92 lines (85 loc) · 3.35 KB
/
Copy pathbuild.sbt
File metadata and controls
92 lines (85 loc) · 3.35 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
ThisBuild / scalaVersion := "2.13.12"
ThisBuild / organization := "com.github.dapperware"
ThisBuild / organizationName := "Dapperware"
ThisBuild / organizationHomepage := Some(url("https://dappermongo.github.io"))
ThisBuild / name := "dappermongo"
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
ThisBuild / scalafixScalaBinaryVersion := CrossVersion.binaryScalaVersion(scalaVersion.value)
inThisBuild(
List(
scmInfo := Some(
ScmInfo(
url("https://github.com/dapperware/dappermongo/"),
"scm:git:git@github.com:dapperware/dappermongo.git"
)
),
developers := List(
Developer(
"paulpdaniels",
"Paul Daniels",
"",
url("https://github.com/paulpdaniels")
)
),
licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
)
)
)
enablePlugins(
ZioSbtEcosystemPlugin
)
def scalacOptionsVersion(scalaVersion: String) = CrossVersion.partialVersion(scalaVersion) match {
case Some((2, 13)) => Seq("-Wunused")
case Some((2, 12)) => Seq("-Xlint:unused")
case _ => Nil
}
lazy val core = (project in file("modules/core"))
.settings(
name := "dappermongo-core",
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % "2.0.21",
"dev.zio" %% "zio-streams" % "2.0.21",
"dev.zio" %% "zio-interop-reactivestreams" % "2.0.2",
"org.mongodb" % "mongodb-driver-reactivestreams" % "4.11.0",
"org.reactivemongo" %% "reactivemongo-bson-msb-compat" % "1.1.0-RC12",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.11.0",
"dev.zio" %% "zio-test" % "2.0.21" % Test,
"dev.zio" %% "zio-test-sbt" % "2.0.21" % Test,
"com.dimafeng" %% "testcontainers-scala-mongodb" % "0.40.12" % Test
),
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
Test / fork := true,
scalacOptions := scalacOptionsVersion(scalaVersion.value),
// Mock silencer for Scala3
// Copied from https://github.com/ReactiveMongo/ReactiveMongo-BSON/blob/master/build.sbt
Test / doc / scalacOptions ++= List("-skip-packages", "com.github.ghik"),
Compile / packageBin / mappings ~= {
_.filter { case (_, path) => !path.startsWith("com/github/ghik") }
},
Compile / packageSrc / mappings ~= {
_.filter { case (_, path) => path != "silent.scala" }
}
)
lazy val microsite = project
.enablePlugins(MicrositesPlugin, MdocPlugin)
.settings(
publish / skip := true,
name := "dappermongo-microsite",
micrositeName := "DapperMongo",
micrositeDescription := "A ZIO-friendly MongoDB client",
micrositeFooterText := Some("DapperMongo is maintained by the Dapperware team."),
micrositeDocumentationUrl := "docs"
)
lazy val examples = project
.dependsOn(core)
.settings(
publish / skip := true,
scalacOptions := scalacOptionsVersion(scalaVersion.value)
)
lazy val root = (project in file("."))
.aggregate(core, microsite, examples)
.settings(
publish / skip := true
)