-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.sbt
73 lines (65 loc) · 2.11 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
import Dependencies._
ThisBuild / version := "0.0.1"
ThisBuild / scalaVersion := "2.13.8"
ThisBuild / scalacOptions := Seq(
"-encoding",
"utf8",
"-deprecation",
"-Xfatal-warnings",
"-Xlint:infer-any",
"-Xlint:missing-interpolator",
"-Xlint:package-object-classes",
"-Xlint:unused"
)
lazy val formatAll = taskKey[Unit]("Format all the source code which includes src, test, and build files")
lazy val checkFormat = taskKey[Unit]("Check all the source code which includes src, test, and build files")
addCommandAlias("fmt", "all scalafmtSbt scalafmtAll")
addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheckAll")
lazy val commonSettings = Seq(
formatAll := {
(Compile / scalafmt).value
(Test / scalafmt).value
},
checkFormat := {
(Compile / scalafmtCheck).value
(Test / scalafmtCheck).value
},
Compile / compile := (Compile / compile).dependsOn(checkFormat).value,
Test / test := (Test / test).dependsOn(checkFormat).value
)
lazy val root = (project in file("."))
.settings(
name := "Random Coffee",
commonSettings
)
.aggregate(bootstrap)
lazy val bootstrap = project
.settings(
name := "Bootstrap",
libraryDependencies ++= akkaHttp :+ akkaActor :+ pureconfig,
commonSettings,
Compile / mainClass := Some("com.epam.random_coffee.RandomCoffeeApp")
)
.aggregate(`auth-service`, `rc-events-service`)
.dependsOn(`auth-service`, `rc-events-service`)
lazy val `auth-service` =
(project in file("auth-service"))
.settings(
libraryDependencies ++= akkaHttpJson +: jwtCore +: (akkaHttp ++ circe ++ doobie ++ logging ++ baseTest ++ akkaHttpTest),
commonSettings
)
.aggregate(`database`)
.dependsOn(`database`)
lazy val `rc-events-service` =
(project in file("rc-events-service"))
.settings(
libraryDependencies ++= akkaHttpJson +: jwtCore +: (akkaHttp ++ circe ++ doobie ++ logging ++ baseTest ++ akkaHttpTest),
commonSettings
)
.aggregate(`database`)
.dependsOn(`database`)
lazy val `database` =
(project in file("database")).settings(
libraryDependencies ++= liquibase +: logging,
commonSettings
)