-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
80 lines (73 loc) · 2.48 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
val circeVersion = "0.14.10"
val cirisVersion = "2.3.3"
val enumeratumVersion = "1.7.4"
val http4sVersion = "0.23.28"
val sttpVersion = "1.7.11"
val tapirVersion = "1.11.5"
lazy val commonSettings = Seq(
organization := "com.wellfactored",
idePackagePrefix := Some("com.wellfactored.api.northflank"),
githubTokenSource := TokenSource.Or(TokenSource.GitConfig("github.token"), TokenSource.Environment("GITHUB_TOKEN")),
githubOwner := "wellfactored",
githubRepository := "lib-api-northflank",
scalaVersion := "3.5.1",
startYear := Some(2021),
scalacOptions := commonScalacOptions,
versionScheme := Some("early-semver"),
idePackagePrefix := Some("com.wellfactored.api.northflank")
)
lazy val root = (project in file("."))
.settings(name := "lib-api-northflank")
.dependsOn(model, endpoints, http4sClient)
.aggregate(model, endpoints, http4sClient)
.settings(commonSettings)
.settings(publish / skip := true)
lazy val model =
project
.in(file("modules/model"))
.settings(name := "api-northflank-model")
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"com.beachape" %% "enumeratum" % enumeratumVersion,
"com.softwaremill.sttp.model" %% "core" % sttpVersion
)
)
lazy val endpoints =
project
.in(file("modules/endpoints"))
.settings(name := "api-northflank-endpoints")
.settings(commonSettings)
.dependsOn(model)
.aggregate(model)
.settings(
libraryDependencies ++= Seq(
"io.circe" %% "circe-generic" % circeVersion,
"com.beachape" %% "enumeratum-circe" % enumeratumVersion,
"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % tapirVersion,
"com.softwaremill.sttp.tapir" %% "tapir-cats" % tapirVersion,
"com.softwaremill.sttp.tapir" %% "tapir-enumeratum" % tapirVersion
)
)
lazy val http4sClient =
project
.in(file("modules/client-http4s"))
.settings(name := "api-northflank-client-http4s")
.settings(commonSettings)
.dependsOn(endpoints)
.aggregate(endpoints)
.settings(
libraryDependencies ++= Seq(
"com.softwaremill.sttp.tapir" %% "tapir-http4s-client" % tapirVersion,
"org.http4s" %% "http4s-ember-client" % http4sVersion
)
)
lazy val commonScalacOptions = Seq(
"-feature",
"-deprecation",
"-unchecked",
"-encoding",
"UTF-8",
"-language:higherKinds",
"-language:postfixOps"
)