-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
105 lines (95 loc) · 3.24 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
val Http4sVersion = "0.21.5"
val CirceVersion = "0.13.0"
val Specs2Version = "4.10.0"
val LogbackVersion = "1.2.3"
val TypesafeConfigVersion = "1.4.0"
val PureconfigVersion = "0.14.0"
val MongoDriverVersion = "2.9.0"
val TapirVersion = "0.17.0-M9"
val ScalaBcryptVersion = "4.1"
val ReactiveMongoVersion = "1.0.2"
val CatsVersion = "2.2.0"
val webserviceDependencies = Seq(
"io.circe" %% "circe-generic" % CirceVersion,
"io.circe" %% "circe-core" % CirceVersion,
"org.http4s" %% "http4s-blaze-server" % Http4sVersion,
"org.http4s" %% "http4s-blaze-client" % Http4sVersion,
"org.http4s" %% "http4s-circe" % Http4sVersion,
"org.http4s" %% "http4s-dsl" % Http4sVersion,
"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-openapi-docs" % TapirVersion,
"com.softwaremill.sttp.tapir" %% "tapir-openapi-circe-yaml" % TapirVersion,
"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-http4s" % TapirVersion,
"com.softwaremill.sttp.tapir" %% "tapir-redoc-http4s" % TapirVersion,
"org.specs2" %% "specs2-core" % Specs2Version % "test"
)
inThisBuild(
List(
scalaVersion := "2.13.6",
organization := "dev.alvo",
scalafmtOnCompile := true,
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.10.3"),
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
)
)
lazy val root = (project in file("."))
.aggregate(shared, mongo, todo, user)
lazy val shared = (project in file("shared"))
.settings(
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % LogbackVersion,
"com.github.pureconfig" %% "pureconfig" % PureconfigVersion,
"org.typelevel" %% "cats-core" % CatsVersion,
"org.typelevel" %% "cats-effect" % CatsVersion,
)
)
lazy val mongo = (project in file("mongo-db"))
.dependsOn(shared)
.settings(
libraryDependencies ++= Seq(
"org.reactivemongo" %% "reactivemongo" % ReactiveMongoVersion,
)
)
lazy val todo = (project in file("todo-service"))
.enablePlugins(NativeImagePlugin)
.dependsOn(mongo, shared)
.settings(
name := "todo-service",
version := "0.0.1-SNAPSHOT",
libraryDependencies ++= webserviceDependencies,
libraryDependencies ++= Seq(
"com.github.t3hnar" %% "scala-bcrypt" % ScalaBcryptVersion
),
Compile / mainClass := Some("dev.alvo.todo.Main")
)
lazy val user = (project in file("user-service"))
.enablePlugins(NativeImagePlugin)
.dependsOn(mongo, shared)
.settings(
name := "user-service",
version := "0.0.1-SNAPSHOT",
libraryDependencies ++= webserviceDependencies
)
assemblyMergeStrategy in assembly := {
case PathList("META-INF", "maven", "org.webjars", "swagger-ui", "pom.properties") =>
MergeStrategy.singleOrError
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}
scalacOptions ++= Seq(
"-deprecation",
"-encoding",
"UTF-8",
"-language:higherKinds",
"-language:postfixOps",
"-feature",
"-Wunused",
"-Yrangepos"
)
addCommandAlias("cd", "project")
addCommandAlias("ls", "projects")
addCommandAlias("c", "compile")
addCommandAlias("r", "reload")