-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
89 lines (84 loc) · 2.55 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
ThisBuild / scalaVersion := "2.13.10"
val org = "org.baklanovsoft"
val assemblyStrategy = assembly / assemblyMergeStrategy := {
// to not apply local development override configurations
case PathList("params.conf") =>
MergeStrategy.discard
// openapi docs generation
case PathList("META-INF", "maven", "org.webjars", "swagger-ui", "pom.properties") =>
MergeStrategy.singleOrError
// deduplicate error because of logback, this will fix
case x =>
MergeStrategy.first
}
lazy val app =
(project in file("./app"))
.settings(
name := "shopping-cart-backend",
organization := org,
version := "0.1.0-SNAPSHOT"
)
.settings(
assemblyStrategy,
// for no main manifest attribute error
assembly / mainClass := Some("org.baklanovsoft.shoppingcart.Main")
)
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
scalacOptions ++= Seq(
"-Ymacro-annotations"
)
)
.settings(
libraryDependencies ++= Dependencies.plugins,
libraryDependencies ++= Seq(
Dependencies.cats,
Dependencies.catsEffect,
Dependencies.catsRetry,
Dependencies.chimney,
Dependencies.fs2,
Dependencies.flyway,
Dependencies.flyway4s,
Dependencies.newtype,
Dependencies.pbkdf2,
Dependencies.postgresql,
Dependencies.squants,
Dependencies.logback,
Dependencies.log4cats
) ++ Seq(
Dependencies.apispec,
Dependencies.circe,
Dependencies.derevo,
Dependencies.enumeratum,
Dependencies.http4s,
Dependencies.pureconfig,
Dependencies.refined,
Dependencies.redis4cats,
Dependencies.skunk,
Dependencies.tapir
).flatten
)
.settings(
dependencyOverrides ++= Seq(
) ++ Seq(
Dependencies.circe // conflicts with derevo-circe
).flatten
)
.settings(
libraryDependencies ++= Seq(
Dependencies.TestDependencies.scalaTest,
Dependencies.TestDependencies.scalaMock
) ++ Seq(
Dependencies.TestDependencies.mockitoScala,
Dependencies.TestDependencies.testcontainers,
Dependencies.TestDependencies.weaver
).flatten
)
.settings(
testFrameworks += new TestFramework("weaver.framework.CatsEffect")
)
.settings(
coverageFailOnMinimum := true,
coverageMinimumStmtTotal := 40
)