-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
178 lines (163 loc) · 6.62 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
ThisBuild / organization := "com.dagdelenmustafa"
ThisBuild / scalaVersion := "2.13.10"
lazy val dependencies = new {
val Http4sVersion = "0.23.16"
val CirceVersion = "0.14.3"
val CirceRefinedVersion = "0.14.3"
val MunitVersion = "0.7.29"
val LogbackVersion = "1.2.11"
val MunitCatsEffectVersion = "1.0.7"
val Mongo4CatsVersion = "0.6.5"
val GoogleGuavaVersion = "31.1-jre"
val SvmMetaVersion = "20.2.0"
val RefinedVersions = "0.10.1"
val Fs2Version = "3.4.0"
val Fs2RabbitVersion = "5.0.0"
val FUUIDVersion = "0.8.0-M2"
val SendgridVersion = "4.9.3"
val http4sEmberServer = "org.http4s" %% "http4s-ember-server" % Http4sVersion
val http4sEmberClient = "org.http4s" %% "http4s-ember-client" % Http4sVersion
val http4sCirce = "org.http4s" %% "http4s-circe" % Http4sVersion
val http4sDsl = "org.http4s" %% "http4s-dsl" % Http4sVersion
val circeGeneric = "io.circe" %% "circe-generic" % CirceVersion
val circeRefined = "io.circe" %% "circe-refined" % CirceRefinedVersion
val mongo4catsCore = "io.github.kirill5k" %% "mongo4cats-core" % Mongo4CatsVersion
val mongo4catsCirce = "io.github.kirill5k" %% "mongo4cats-circe" % Mongo4CatsVersion
val guava = "com.google.guava" % "guava" % GoogleGuavaVersion
val refined = "eu.timepit" %% "refined" % RefinedVersions
val fs2 = "co.fs2" %% "fs2-core" % Fs2Version
val fs2Rabbit = "dev.profunktor" %% "fs2-rabbit" % Fs2RabbitVersion
val fs2RabbitCirce = "dev.profunktor" %% "fs2-rabbit-circe" % Fs2RabbitVersion
val FUUID = "io.chrisdavenport" %% "fuuid" % FUUIDVersion
val FUUIDCirce = "io.chrisdavenport" %% "fuuid-circe" % FUUIDVersion
val FUUIDHttp4s = "io.chrisdavenport" %% "fuuid-http4s" % FUUIDVersion
val sendgrid = "com.sendgrid" % "sendgrid-java" % SendgridVersion
val mongo4catsEmbedded = "io.github.kirill5k" %% "mongo4cats-embedded" % Mongo4CatsVersion % Test
val munit = "org.scalameta" %% "munit" % MunitVersion % Test
val munitCatsEffect = "org.typelevel" %% "munit-cats-effect-3" % MunitCatsEffectVersion % Test
val logback = "ch.qos.logback" % "logback-classic" % LogbackVersion % Runtime
val svmMeta = "org.scalameta" %% "svm-subs" % SvmMetaVersion
}
lazy val commonDependencies = Seq(
dependencies.http4sEmberClient,
dependencies.http4sCirce,
dependencies.circeGeneric,
dependencies.munit,
dependencies.munitCatsEffect,
dependencies.mongo4catsCore,
dependencies.mongo4catsCirce,
dependencies.circeRefined,
dependencies.refined,
dependencies.logback,
dependencies.mongo4catsEmbedded,
dependencies.svmMeta,
dependencies.FUUID,
dependencies.FUUIDCirce,
dependencies.fs2,
dependencies.fs2Rabbit,
dependencies.fs2RabbitCirce
)
lazy val notifierRestServiceDependencies = commonDependencies ++ Seq(
dependencies.http4sEmberServer,
dependencies.http4sDsl,
dependencies.guava,
dependencies.FUUIDHttp4s
)
lazy val notifierNotificationSenderDependencies = commonDependencies ++ Seq(
dependencies.sendgrid
)
lazy val root = project
.in(file("."))
.settings(settings)
.disablePlugins(AssemblyPlugin)
.aggregate(
common,
notifierRestService
)
lazy val common = project
.in(file("modules/common"))
.settings(
description := "Common components for the notifier app.",
name := "common",
version := "0.0.1-SNAPSHOT",
settings,
libraryDependencies ++= commonDependencies
)
.disablePlugins(AssemblyPlugin)
lazy val notifierRestService = project
.in(file("modules/notifier-rest-service"))
.settings(
description := "Rest service of the notifier app",
name := "notifier-rest-service",
version := "0.0.1-SNAPSHOT",
settings,
libraryDependencies ++= notifierRestServiceDependencies,
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full),
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1"),
testFrameworks += new TestFramework("munit.Framework")
)
.disablePlugins(AssemblyPlugin)
.dependsOn(common)
lazy val notifierPriceChecker = project
.in(file("modules/notifier-price-checker"))
.settings(
description := "Price checker",
name := "notifier-price-checker",
version := "0.0.1-SNAPSHOT",
settings,
libraryDependencies ++= commonDependencies,
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full),
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1"),
testFrameworks += new TestFramework("munit.Framework")
)
.disablePlugins(AssemblyPlugin)
.dependsOn(common)
lazy val notifierNotificationSender = project
.in(file("modules/notifier-notification-sender"))
.settings(
description := "A service that sends notifications to end users.",
name := "notifier-notification-sender",
version := "0.0.1-SNAPSHOT",
settings,
libraryDependencies ++= notifierNotificationSenderDependencies,
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full),
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1"),
testFrameworks += new TestFramework("munit.Framework")
)
.disablePlugins(AssemblyPlugin)
.dependsOn(common)
lazy val settings =
commonSettings
lazy val compilerOptions = Seq(
"-unchecked",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-language:postfixOps",
"-deprecation",
"-encoding",
"utf8"
)
lazy val commonSettings = Seq(
scalacOptions := compilerOptions,
startYear := Some(2022),
developers := List(
Developer("dagdelenmustafa",
"Mustafa Dağdelen",
url("https://github.com/dagdelenmustafa")
)
),
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0"))
)
lazy val assemblySettings = Seq(
assembly / assemblyJarName := name.value + ".jar",
assembly / assemblyMergeStrategy := {
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case "application.conf" => MergeStrategy.concat
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
}
)