forked from Banno/cosmos4s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
148 lines (141 loc) · 4.61 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
val catsV = "2.6.1"
val catsEffectV = "3.2.9"
val fs2V = "3.1.4"
val circeV = "0.14.1"
val munitV = "0.7.29"
val munitCatsEffectV = "1.0.6"
val kindProjectorV = "0.13.2"
lazy val `cosmos4s` = project
.in(file("."))
.enablePlugins(NoPublishPlugin)
.settings(commonSettings)
.aggregate(core)
lazy val core = project
.in(file("core"))
.settings(commonSettings)
.settings(
name := "cosmos4s"
)
lazy val site = project
.in(file("site"))
.enablePlugins(MicrositesPlugin)
.enablePlugins(MdocPlugin)
.enablePlugins(NoPublishPlugin)
.settings(commonSettings)
.dependsOn(core)
.settings {
import microsites._
Seq(
micrositeName := "cosmos4s",
micrositeDescription := "Cosmos Access Api",
micrositeAuthor := "Banno",
micrositeGithubOwner := "Banno",
micrositeGithubRepo := "cosmos4s",
micrositeBaseUrl := "/cosmos4s",
micrositeDocumentationUrl := "https://www.javadoc.io/doc/com.banno/cosmos4s_2.13",
micrositeFooterText := None,
micrositeHighlightTheme := "atom-one-light",
micrositePalette := Map(
"brand-primary" -> "#3e5b95",
"brand-secondary" -> "#294066",
"brand-tertiary" -> "#2d5799",
"gray-dark" -> "#49494B",
"gray" -> "#7B7B7E",
"gray-light" -> "#E5E5E6",
"gray-lighter" -> "#F4F3F4",
"white-color" -> "#FFFFFF"
),
scalacOptions --= 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("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(
startYear := Some(2020),
licenses += ("Apache-2.0", new URL("https://www.apache.org/licenses/LICENSE-2.0.txt")),
headerLicense := Some(HeaderLicense.ALv2("2020", "Jack Henry & Associates, Inc.®")),
crossScalaVersions := Seq(scalaVersion.value, "2.13.6", "2.12.14"),
libraryDependencies ++= Seq(
"com.azure" % "azure-cosmos" % "4.20.0",
"com.microsoft.azure" % "azure-documentdb" % "2.6.4",
"com.microsoft.azure" % "documentdb-bulkexecutor" % "2.12.4",
"org.typelevel" %% "cats-core" % catsV,
"org.typelevel" %% "cats-effect" % catsEffectV,
"co.fs2" %% "fs2-reactive-streams" % fs2V,
"io.circe" %% "circe-core" % circeV,
"io.circe" %% "circe-parser" % circeV,
"io.circe" %% "circe-jackson210" % "0.14.0",
"org.scalameta" %% "munit" % munitV % Test,
"org.typelevel" %% "munit-cats-effect-3" % munitCatsEffectV % Test
) ++
// format: off
(if (scalaVersion.value.startsWith("2"))
Seq(compilerPlugin(("org.typelevel" %% "kind-projector" % kindProjectorV).cross(CrossVersion.full)))
else Seq()),
scalacOptions ++= (if (scalaVersion.value.startsWith("3"))
Seq("-Ykind-projector")
else Seq())
// format: on
)
Compile / scalacOptions ++= Seq(
"-groups",
"-sourcepath",
(LocalRootProject / baseDirectory).value.getAbsolutePath,
"-doc-source-url",
"https://github.com/banno/cosmos4s/blob/v" + version.value + "€{FILE_PATH}.scala"
)
// General Settings
inThisBuild(
List(
scalaVersion := "3.0.1",
developers := List(
Developer(
"ChristopherDavenport",
"Christopher Davenport",
url("https://github.com/ChristopherDavenport")
),
Developer(
"JesusMtnez",
"Jesús Martínez",
url("https://github.com/JesusMtnez")
),
Developer(
"BeniVF",
"Benigno Villa Fernández",
url("https://github.com/BeniVF")
),
Developer(
"Ryan-Banno",
"Ryan D",
url("https://github.com/Ryan-Banno")
)
),
homepage := Some(url("https://github.com/Banno/cosmos4s")),
organization := "com.banno",
organizationName := "Jack Henry & Associates, Inc.®"
)
)