-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
128 lines (122 loc) · 4.58 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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
val catsV = "2.1.1"
val catsEffectV = "2.1.3"
val fs2V = "2.0.0"
val log4catsV = "1.0.1"
val log4jSlf4jImplV = "2.13.2"
val specs2V = "4.8.1"
val catsEffectScalaTestV = "0.4.0"
val mongoScalaDriverV = "4.0.2"
val kindProjectorV = "0.11.0"
val betterMonadicForV = "0.3.1"
// Projects
lazy val `mongo4s` = project
.in(file("."))
.disablePlugins(MimaPlugin)
.enablePlugins(NoPublishPlugin)
.aggregate(core)
lazy val core = project
.in(file("core"))
.settings(commonSettings)
.settings(name := "mongo4s")
lazy val site = project
.in(file("site"))
.disablePlugins(MimaPlugin)
.enablePlugins(MicrositesPlugin)
.enablePlugins(MdocPlugin)
.enablePlugins(NoPublishPlugin)
.settings(commonSettings)
.dependsOn(core)
.settings {
import microsites._
Seq(
micrositeName := "mongo4s",
micrositeDescription := "a functional wrapper on mongo driver",
micrositeAuthor := "fp-in-bo",
micrositeGithubOwner := "fp-in-bo",
micrositeGithubRepo := "mongo4s",
micrositeBaseUrl := "/mongo4s",
micrositeDocumentationUrl := "https://www.javadoc.io/doc/dev.fpinbo/mongo4s_2.12",
micrositeFooterText := None,
micrositeHighlightTheme := "atom-one-light",
micrositePalette := Map(
"brand-primary" -> "#4DB33D",
"brand-secondary" -> "#3FA037",
"brand-tertiary" -> "#3FA037",
"gray-dark" -> "#3F3E42",
"gray" -> "#C1BEBC",
"gray-light" -> "#E8E7D5",
"gray-lighter" -> "#E8E7D5",
"white-color" -> "#FFFFFF"
),
micrositeCompilingDocsTool := WithMdoc,
scalacOptions in Tut --= Seq(
"-Xfatal-warnings",
"-Ywarn-unused-import",
"-Ywarn-numeric-widen",
"-Ywarn-dead-code",
"-Ywarn-unused:imports",
"-Xlint:-missing-interpolator,_"
),
micrositePushSiteWith := GitHub4s,
micrositeGithubToken := sys.env.get("GITHUB_TOKEN"),
micrositeExtraMdFiles := Map(
file("README.md") -> ExtraMdFileConfig(
"index.md",
"home",
Map("section" -> "home", "position" -> "0", "permalink" -> "/")
),
file("CODE_OF_CONDUCT.md") -> ExtraMdFileConfig(
"code-of-conduct.md",
"page",
Map("title" -> "Code of conduct", "section" -> "code of conduct", "position" -> "100")
),
file("LICENSE") -> ExtraMdFileConfig(
"license.md",
"page",
Map("title" -> "License", "section" -> "license", "position" -> "101")
)
)
)
}
// General Settings
lazy val commonSettings = Seq(
scalaVersion := "2.13.1",
crossScalaVersions := Seq(scalaVersion.value, "2.12.10"),
scalafmtOnCompile := true,
addCompilerPlugin(
"org.typelevel" %% "kind-projector" % kindProjectorV cross CrossVersion.full
),
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % betterMonadicForV),
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % catsV,
"org.typelevel" %% "cats-effect" % catsEffectV,
"co.fs2" %% "fs2-core" % fs2V,
"co.fs2" %% "fs2-io" % fs2V,
"co.fs2" %% "fs2-reactive-streams" % fs2V,
"org.mongodb.scala" %% "mongo-scala-driver" % mongoScalaDriverV,
"io.chrisdavenport" %% "log4cats-slf4j" % log4catsV,
"org.apache.logging.log4j" % "log4j-slf4j-impl" % log4jSlf4jImplV % Runtime,
"com.codecommit" %% "cats-effect-testing-scalatest" % catsEffectScalaTestV % Test
)
)
// General Settings
inThisBuild(
List(
organization := "dev.fpinbo",
developers := List(
Developer("azanin", "Alessandro Zanin", "[email protected]", url("https://github.com/azanin")),
Developer("al333z", "Alessandro Zoffoli", "[email protected]", url("https://github.com/al333z")),
Developer("r-tomassetti", "Renato Tomassetti", "[email protected]", url("https://github.com/r-tomassetti"))
),
homepage := Some(url("https://github.com/fp-in-bo/mongo4s")),
licenses += ("MIT", url("http://opensource.org/licenses/MIT")),
pomIncludeRepository := { _ => false },
scalacOptions in (Compile, doc) ++= Seq(
"-groups",
"-sourcepath",
(baseDirectory in LocalRootProject).value.getAbsolutePath,
"-doc-source-url",
"https://github.com/fp-in-bo/mongo4s/blob/v" + version.value + "€{FILE_PATH}.scala"
)
)
)