-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
79 lines (69 loc) · 2.21 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
import Dependencies.*
ThisBuild / scalaVersion := "2.13.10"
ThisBuild / organization := "com.github.killjoyer"
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
ThisBuild / scalacOptions := Seq("-Ywarn-unused", "-Ymacro-annotations", "-Wunused:imports")
Compile / PB.targets := Seq(
scalapb.gen(grpc = true) -> (Compile / sourceManaged).value / "scalapb",
scalapb.zio_grpc.ZioCodeGenerator -> (Compile / sourceManaged).value / "scalapb",
)
lazy val commonLibraries =
Seq(
zio.core,
zio.stream,
zio.concurrent,
zio.test,
zio.testSbt,
zio.mock,
zio.catsInterop,
cats.core,
circe.core,
circe.generic,
circe.extras,
tofu.zioLogging,
tofu.logging,
utils.newtype,
)
lazy val dbLibraries = Seq(doobie.core, doobie.postgres)
lazy val httpLibraries = Seq(tapir.core, tapir.zio, tapir.zioHttpServer, tapir.swagger, tapir.circe, tapir.newtype)
lazy val domain = (project in file("little-games/domain"))
.settings(
name := "domain",
libraryDependencies ++= commonLibraries,
)
lazy val serviceLayer = (project in file("little-games/service-layer"))
.dependsOn(domain)
.settings(
name := "service-layer",
libraryDependencies ++= commonLibraries,
)
lazy val dataAccessLayer = (project in file("little-games/data-layer"))
.dependsOn(domain, serviceLayer)
.settings(
name := "data-layer",
libraryDependencies ++= commonLibraries ++ dbLibraries,
)
lazy val apiLayer = (project in file("little-games/api-layer"))
.dependsOn(domain, serviceLayer)
.settings(
name := "api-layer",
libraryDependencies ++= commonLibraries ++ httpLibraries,
)
lazy val app = (project in file("little-games/main"))
.dependsOn(domain, dataAccessLayer, serviceLayer, apiLayer)
.settings(
name := "main",
libraryDependencies ++=
commonLibraries ++
dbLibraries ++
httpLibraries ++
Seq(
grpc.netty,
grpc.runtime,
zio.config,
zio.configTypesafe,
zio.configMagnolia,
),
// testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
)