-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
261 lines (243 loc) · 8.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
// *****************************************************************************
// Build settings
// *****************************************************************************
inThisBuild(
Seq(
organization := "com.github.pjfanning",
startYear := Some(2023),
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")),
homepage := Some(url("https://github.com/pjfanning/pekko-http-json")),
scmInfo := Some(
ScmInfo(
url("https://github.com/pjfanning/pekko-http-json"),
"[email protected]:pjfanning/pekko-http-json.git"
)
),
developers := List(
Developer(
"hseeberger",
"Heiko Seeberger",
url("https://github.com/hseeberger")
),
Developer(
"pjfanning",
"PJ Fanning",
"",
url("https://github.com/pjfanning")
),
),
scalaVersion := "2.13.15",
crossScalaVersions := Seq("2.13.15", "2.12.20"),
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-language:_",
"-encoding",
"UTF-8",
"-Ywarn-unused:imports",
"-target:jvm-1.8"
),
scalafmtOnCompile := true,
dynverSeparator := "_" // the default `+` is not compatible with docker tags
)
)
val withScala3 = Seq(
crossScalaVersions += "3.3.4",
)
// *****************************************************************************
// Projects
// *****************************************************************************
lazy val `pekko-http-json` =
project
.in(file("."))
.disablePlugins(MimaPlugin)
.aggregate(
`pekko-http-argonaut`,
`pekko-http-avro4s`,
`pekko-http-circe`,
`pekko-http-jackson`,
`pekko-http-json4s`,
`pekko-http-jsoniter-scala`,
`pekko-http-ninny`,
`pekko-http-play-json`,
`pekko-http-upickle`,
`pekko-http-zio-json`,
)
.settings(commonSettings)
.settings(
Compile / unmanagedSourceDirectories := Seq.empty,
Test / unmanagedSourceDirectories := Seq.empty,
publishArtifact := false,
)
lazy val `pekko-http-argonaut` =
project
.settings(commonSettings, withScala3)
.settings(
libraryDependencies ++= Seq(
library.pekkoHttp,
library.argonaut,
library.pekkoStream % Provided,
library.scalaTest % Test,
)
)
lazy val `pekko-http-circe` =
project
.settings(commonSettings, withScala3)
.settings(
libraryDependencies ++= Seq(
library.pekkoHttp,
library.circe,
library.circeParser,
library.pekkoStream % Provided,
library.circeGeneric % Test,
library.scalaTest % Test,
)
)
lazy val `pekko-http-jackson` =
project
.settings(commonSettings, withScala3)
.settings(
libraryDependencies ++= Seq(
library.pekkoHttp,
library.pekkoHttpJacksonJava,
library.jacksonModuleScala,
library.pekkoStream % Provided,
library.scalaTest % Test,
library.jacksonModuleParamNames % Test
)
)
lazy val `pekko-http-json4s` =
project
.settings(commonSettings, withScala3)
.settings(
libraryDependencies ++= Seq(
library.pekkoHttp,
library.json4sCore,
library.pekkoStream % Provided,
library.json4sJackson % Test,
library.json4sNative % Test,
library.scalaTest % Test,
)
)
lazy val `pekko-http-jsoniter-scala` =
project
.settings(commonSettings, withScala3)
.settings(
libraryDependencies ++= Seq(
library.pekkoHttp,
library.jsoniterScalaCore,
library.pekkoStream % Provided,
library.jsoniterScalaMacros % Test,
library.scalaTest % Test,
)
)
lazy val `pekko-http-ninny` =
project
.settings(commonSettings, withScala3)
.settings(
libraryDependencies ++= Seq(
library.pekkoHttp,
library.ninny,
library.pekkoStream % Provided,
library.scalaTest % Test,
)
)
lazy val `pekko-http-play-json` =
project
.settings(commonSettings, withScala3)
.settings(
libraryDependencies ++= Seq(
library.pekkoHttp,
library.playJson,
library.pekkoStream % Provided,
library.scalaTest % Test,
)
)
lazy val `pekko-http-upickle` =
project
.settings(commonSettings, withScala3)
.settings(
libraryDependencies ++= Seq(
library.pekkoHttp,
library.upickle,
library.pekkoStream % Provided,
library.scalaTest % Test,
)
)
lazy val `pekko-http-avro4s` =
project
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
library.pekkoHttp,
library.avro4sJson,
library.pekkoStream % Provided,
library.scalaTest % Test,
)
)
lazy val `pekko-http-zio-json` =
project
.settings(commonSettings, withScala3)
.settings(
libraryDependencies ++= Seq(
library.pekkoHttp,
library.zioJson,
library.pekkoStream % Provided,
library.scalaTest % Test
)
)
// *****************************************************************************
// Project settings
// *****************************************************************************
lazy val commonSettings =
Seq(
// Also (automatically) format build definition together with sources
Compile / scalafmt := {
val _ = (Compile / scalafmtSbt).value
(Compile / scalafmt).value
}
)
// *****************************************************************************
// Library dependencies
// *****************************************************************************
lazy val library =
new {
object Version {
val pekko = "1.1.2"
val pekkoHttp = "1.1.0"
val argonaut = "6.3.10"
val avro4s = "4.1.2"
val circe = "0.14.10"
val jacksonModuleScala = "2.18.0"
val json4s = "4.0.7"
val jsoniterScala = "2.31.1"
val ninny = "0.9.1"
val play = "3.0.4"
val scalaTest = "3.2.19"
val upickle = "4.0.2"
val zioJson = "0.7.3"
}
// format: off
val pekkoHttp = "org.apache.pekko" %% "pekko-http" % Version.pekkoHttp
val pekkoHttpJacksonJava = "org.apache.pekko" %% "pekko-http-jackson" % Version.pekkoHttp
val pekkoStream = "org.apache.pekko" %% "pekko-stream" % Version.pekko
val argonaut = "io.argonaut" %% "argonaut" % Version.argonaut
val avro4sJson = "com.sksamuel.avro4s" %% "avro4s-json" % Version.avro4s
val circe = "io.circe" %% "circe-core" % Version.circe
val circeGeneric = "io.circe" %% "circe-generic" % Version.circe
val circeParser = "io.circe" %% "circe-parser" % Version.circe
val jacksonModuleScala = "com.fasterxml.jackson.module" %% "jackson-module-scala" % Version.jacksonModuleScala
val jacksonModuleParamNames = "com.fasterxml.jackson.module" % "jackson-module-parameter-names" % Version.jacksonModuleScala
val json4sCore = "org.json4s" %% "json4s-core" % Version.json4s
val json4sJackson = "org.json4s" %% "json4s-jackson" % Version.json4s
val json4sNative = "org.json4s" %% "json4s-native" % Version.json4s
val jsoniterScalaCore = "com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-core" % Version.jsoniterScala
val jsoniterScalaMacros = "com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % Version.jsoniterScala
val ninny = "tk.nrktkt" %% "ninny" % Version.ninny
val playJson = "org.playframework" %% "play-json" % Version.play
val scalaTest = "org.scalatest" %% "scalatest" % Version.scalaTest
val upickle = "com.lihaoyi" %% "upickle" % Version.upickle
val zioJson = "dev.zio" %% "zio-json" % Version.zioJson
// format: on
}