-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
265 lines (252 loc) · 11.3 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
262
263
264
265
lazy val Scala3 = "3.3.0"
lazy val Scala213 = "2.13.6"
lazy val catsVersion = "2.9.0"
lazy val ceVersion = "3.5.1"
lazy val fs2Version = "3.8.0"
lazy val circeVersion = "0.14.5"
lazy val grpcVersion = "1.57.1"
lazy val googleProtoVersion = "3.23.4"
lazy val monocleVersion = "3.1.0"
lazy val scodecVersion = "1.1.37"
lazy val junitVersion = "0.11"
lazy val castanetVersion = "0.1.10"
lazy val didCommVersion = "0.3.2"
lazy val sttpVersion = "3.8.16"
lazy val tinkVersion = "1.10.0"
lazy val redis4catsVersion = "1.4.3"
lazy val openAIVersion = "0.4.1"
lazy val bouncyCastleVersion = "1.70"
lazy val titaniumVersion = "1.3.2"
lazy val munitVersion = "1.0.0-M8"
lazy val munitCEVersion = "1.0.7"
lazy val pureconfigVersion = "0.17.4"
lazy val ipfsVersion = "1.4.4"
lazy val log4catsVersion = "2.6.0"
lazy val logbackVersion = "1.4.8"
lazy val slf4jVersion = "1.7.36"
lazy val shapelessVersion = "3.3.0"
lazy val passkitVersion = "0.3.4-SNAPSHOT"
lazy val tapirVersion = "1.6.4"
lazy val http4sVersion = "0.23.23"
lazy val refinedVersion = "0.11.0"
lazy val emilVersion = "0.14.0"
lazy val xebiaVersion = "0.0.3"
//lazy val didCommonVersion = "1.0.0"
lazy val commonSettings = Seq(
resolvers ++= Seq(
"github" at "https://maven.pkg.github.com/iandebeer",
Resolver.mavenLocal,
"jitpack" at "https://jitpack.io",
"snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
"releases" at "https://oss.sonatype.org/content/repositories/releases"
),
libraryDependencies ++= Seq(
// m "org.scala-lang" %% "scala3-staging" % Scala3,
"org.typelevel" %% "cats-core" % catsVersion,
"co.fs2" %% "fs2-core" % fs2Version,
"co.fs2" %% "fs2-io" % fs2Version,
"org.typelevel" %% "cats-effect" % ceVersion,
"org.scodec" %% "scodec-bits" % scodecVersion,
"org.scala-lang" %% "scala3-staging" % Scala3,
"io.circe" %% "circe-yaml" % "0.14.2",
"dev.mn8" %% "castanet" % castanetVersion,
"org.typelevel" %% "cats-core" % catsVersion,
"org.typelevel" %% "cats-effect" % ceVersion,
"org.bouncycastle" % "bcpkix-jdk15on" % bouncyCastleVersion,
"org.typelevel" %% "log4cats-core" % log4catsVersion,
"org.typelevel" %% "log4cats-slf4j" % log4catsVersion,
"com.github.ipfs" % "java-ipfs-http-client" % ipfsVersion,
"com.github.pureconfig" %% "pureconfig-core" % pureconfigVersion,
"com.github.pureconfig" %% "pureconfig-cats-effect" % pureconfigVersion,
"eu.timepit" %% "refined-pureconfig" % refinedVersion,
"dev.profunktor" %% "redis4cats-effects" % redis4catsVersion,
"dev.profunktor" %% "redis4cats-log4cats" % redis4catsVersion,
"com.softwaremill.sttp.tapir" %% "tapir-core" % tapirVersion,
"com.softwaremill.sttp.tapir" %% "tapir-http4s-server" % tapirVersion,
"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % tapirVersion,
"com.softwaremill.sttp.tapir" %% "tapir-sttp-stub-server" % tapirVersion % Test,
"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % tapirVersion,
"com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % tapirVersion,
"com.softwaremill.sttp.tapir" %% "tapir-asyncapi-docs" % tapirVersion,
"com.github.eikek" %% "emil-common" % emilVersion,
"com.github.eikek" %% "emil-javamail" % emilVersion,
"com.softwaremill.sttp.client3" %% "core" % sttpVersion,
"com.softwaremill.sttp.apispec" %% "apispec-model" % "0.6.0",
"com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % "0.6.0",
"org.http4s" %% "http4s-blaze-server" % "0.23.15",
"org.http4s" %% "http4s-dsl" % http4sVersion,
"ch.qos.logback" % "logback-classic" % logbackVersion,
"com.xebia" %% "xef-scala" % xebiaVersion,
"com.xebia" % "xef-pdf" % xebiaVersion % "runtime",
"com.xebia" % "xef-reasoning-jvm" % xebiaVersion,
"com.xebia" % "xef-openai" % xebiaVersion % "runtime" pomOnly (),
// "org.slf4j" % "slf4j-api" % slf4jVersion,
// "org.slf4j" % "slf4j-nop" % slf4jVersion ,
"org.scalameta" %% "munit" % munitVersion % Test,
"org.scalameta" %% "munit-scalacheck" % munitVersion % Test,
"org.typelevel" %% "munit-cats-effect-3" % munitCEVersion % Test
),
libraryDependencies ++= Seq(
// "io.circe" %% "circe-yaml",
"io.circe" %% "circe-core",
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser"
).map(_ % circeVersion)
)
lazy val grpcSettings = Seq(
libraryDependencies ++= Seq(
"io.grpc" % "grpc-netty-shaded",
"io.grpc" % "grpc-core",
"io.grpc" % "grpc-protobuf",
"io.grpc" % "grpc-stub",
"io.grpc" % "grpc-netty-shaded"
).map(_ % grpcVersion)
)
ThisBuild / version := "0.0.1"
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / organization := "dev.mn8"
ThisBuild / organizationName := "MN8 Technology ÖU"
ThisBuild / organizationHomepage := Some(url("https://mn8.dev"))
Global / scalaVersion := Scala3
/*
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/iandebeer/gleibnif"),
"scm:[email protected]/gleibnif.git"
)
)
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / developers := List(
Developer(
id = "iandebeer",
name = "Ian de Beer",
email = "[email protected]",
url = url("https://mn8.dev")
)
)
ThisBuild / githubOwner := "iandebeer"
ThisBuild /githubRepository := "gleibnif" */
//ThisBuild / githubTokenSource := TokenSource.GitConfig("github.token")// || TokenSource.Environment("GITHUB_TOKEN")
lazy val root = project
.in(file("."))
.aggregate(core, protocol, client, server)
.settings(
publish / skip := true,
publishConfiguration := publishConfiguration.value.withOverwrite(true),
publishLocalConfiguration := publishLocalConfiguration.value
.withOverwrite(true)
)
lazy val core = project
.in(file("modules/core"))
.settings(commonSettings: _*)
.settings(
name := "gleibnifCore",
crossPaths := false,
autoScalaLibrary := false,
resolvers ++= Seq(
Resolver.mavenLocal,
"google" at "https://maven.google.com/"
),
// crossScalaVersions := List(scala3, scala212),
libraryDependencies ++= Seq(
// "org.scala-lang" %% "scala3-staging" % Scala3,
"org.didcommx" % "didcomm" % didCommVersion,
"com.apicatalog" % "titanium-json-ld" % titaniumVersion,
"org.glassfish" % "jakarta.json" % "2.0.1",
"com.google.crypto.tink" % "tink" % tinkVersion,
"com.google.crypto.tink" % "tink-awskms" % "1.8.0"
)
)
lazy val protocol = project
.in(file("modules/protocol"))
.settings(
name := "gleibnifProtocol",
description := "Protobuf definitions",
/* Compile / PB.targets := Seq(
//PB.gens.java -> (Compile / sourceManaged).value,
scalapb.gen() -> (Compile / sourceManaged).value,
scalapb.gen(flatPackage = true) -> (Compile / sourceManaged).value
), */
libraryDependencies ++= Seq(
"com.google.protobuf" % "protobuf-java" % googleProtoVersion % "protobuf"
)
)
.enablePlugins(Fs2Grpc)
lazy val client = project
.in(file("modules/client"))
.settings(
name := "gleibnifClient",
description := "Protobuf Client",
Compile / mainClass := Some("dev.mn8.gleibnif.Main"),
resolvers ++= Seq(
Resolver.mavenLocal,
"jitpack" at "https://jitpack.io",
"snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
"releases" at "https://oss.sonatype.org/content/repositories/releases"
),
libraryDependencies ++= Seq(
/*
<groupId>com.github.kenglxn.QRGen</groupId>
<artifactId>javase</artifactId>
<version>3.0.1</version>
*/
"com.github.kenglxn.QRGen" % "javase" % "3.0.1",
// "org.scala-lang" %% "scala3-staging" % Scala3,
// "decentralized-identity" % "did-common-java" % didCommonVersion,
"com.softwaremill.sttp.client3" %% "core" % sttpVersion,
"com.softwaremill.sttp.client3" %% "circe" % sttpVersion,
"com.softwaremill.sttp.client3" %% "cats" % sttpVersion,
"com.softwaremill.sttp.client3" %% "async-http-client-backend-cats" % sttpVersion,
"com.apicatalog" % "titanium-json-ld" % titaniumVersion,
"org.glassfish" % "jakarta.json" % "2.0.1",
"org.didcommx" % "didcomm" % "0.3.2",
"io.cequence" %% "openai-scala-client" % openAIVersion,
"de.brendamour" % "jpasskit" % passkitVersion,
"com.google.crypto.tink" % "tink" % tinkVersion,
"org.typelevel" %% "shapeless3-deriving" % shapelessVersion
),
scalapbCodeGeneratorOptions += CodeGeneratorOption.FlatPackage
)
.settings(commonSettings: _*)
.settings(grpcSettings: _*)
.enablePlugins(Fs2Grpc)
.enablePlugins(JavaAppPackaging, DockerPlugin)
.settings(
dockerBaseImage := "openjdk:21-jdk-slim",
Docker / packageName := "dawnpatrol",
Docker / version := "latest"
)
.dependsOn(protocol)
.dependsOn(core)
.dependsOn(protocol % "protobuf")
lazy val server = project
.in(file("modules/server"))
.settings(commonSettings: _*)
.settings(grpcSettings: _*)
.settings(
scalaVersion := Scala3,
name := "gleibnifServer",
description := "Protobuf Server",
// nativeImageVersion := "21.2.0",
Compile / mainClass := Some("dev.mn8.gleibnif.Main"),
libraryDependencies ++= List(
"dev.mn8" %% "castanet" % castanetVersion,
"org.typelevel" %% "cats-core" % catsVersion,
"co.fs2" %% "fs2-core" % fs2Version,
"co.fs2" %% "fs2-io" % fs2Version,
"org.typelevel" %% "cats-effect" % ceVersion,
"io.grpc" % "grpc-netty-shaded" % grpcVersion,
"io.grpc" % "grpc-core" % grpcVersion,
"io.grpc" % "grpc-services" % grpcVersion
),
scalapbCodeGeneratorOptions += CodeGeneratorOption.FlatPackage
)
.enablePlugins(Fs2Grpc)
.enablePlugins(JavaAppPackaging, DockerPlugin)
.settings(
dockerBaseImage := "openjdk:21-jdk-slim",
Docker / packageName := "dwn-grpc-server",
Docker / version := "latest"
)
.dependsOn(protocol)
.dependsOn(protocol % "protobuf")