-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
94 lines (82 loc) · 2.66 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
import NativePackagerHelper._
import com.typesafe.sbt.packager.docker._
import TodoListPlugin._
ThisBuild / scalaVersion := "2.13.3"
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / organization := "q2io"
ThisBuild / organizationName := "q2io"
lazy val supportedScalaVersions = List("2.12.12", "2.13.3")
lazy val projectSettings = Seq(
bloopAggregateSourceDependencies in Global := true,
bloopExportJarClassifiers in Global := Some(Set("sources")),
scalafmtOnCompile := true,
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots"),
"jitpack" at "https://jitpack.io"
),
libraryDependencies ++= Seq(
compilerPlugin(Dependencies.kindProject cross CrossVersion.full),
compilerPlugin(Dependencies.betterMonadicFor)
),
crossScalaVersions := supportedScalaVersions,
Test / fork := true,
parallelExecution := false,
Test / testForkedParallel := false
)
lazy val dockerSettings = Seq(
version in Docker := s"""${version.value}-${scala.sys.props
.getOrElse(" build_number", "local-build")}""",
dockerRepository := Some(organization.value),
dockerUpdateLatest := true
)
lazy val commonSettings = projectSettings ++ CompilerSettings.options
compileWithTodolistSettings
lazy val root = (project in file("."))
.aggregate(domain, core, http, bootstrap)
.settings(
name := "cb-proto",
publish / skip := true
)
lazy val domain = (project in file("modules/01-domain"))
.settings(commonSettings: _*)
.settings(
libraryDependencies ++=
Dependencies.core ++
Dependencies.test
)
.settings(dockerSettings: _*)
lazy val core = (project in file("modules/02-core"))
.settings(commonSettings: _*)
.settings(
libraryDependencies ++=
Dependencies.core ++
Dependencies.test
)
.settings(dockerSettings: _*)
.dependsOn(domain % "compile->compile;test->test")
lazy val http = (project in file("modules/03-http"))
.settings(commonSettings: _*)
.settings(dockerSettings: _*)
.enablePlugins(DockerPlugin)
.settings(
libraryDependencies ++= Dependencies.core ++ Dependencies.api ++ Dependencies.test
)
.dependsOn(
domain % "compile->compile;test->test",
core % "compile->compile;test->test"
)
lazy val bootstrap = (project in file("modules/04-bootstrap"))
.settings(commonSettings: _*)
.settings(dockerSettings: _*)
.enablePlugins(JavaAppPackaging)
.enablePlugins(DockerPlugin)
.settings(
libraryDependencies ++= Dependencies.core ++ Dependencies.api ++ Dependencies.test
)
.dependsOn(
domain % "compile->compile;test->test",
core % "compile->compile;test->test",
http % "compile->compile;test->test"
)
enablePlugins(MicrositesPlugin)