forked from fun-cqrs/fun-cqrs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
80 lines (61 loc) · 2.25 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._
import BuildSettings._
name := "fun-cqrs"
organization in ThisBuild := "io.strongtyped"
scalaVersion in ThisBuild := "2.11.8"
crossScalaVersions in ThisBuild := Seq("2.11.8", "2.12.1")
ivyScala := ivyScala.value map {
_.copy(overrideScalaVersion = true)
}
scalacOptions := Seq("-unchecked", "-deprecation", "-feature", "-Xlint:-infer-any", "-Xfatal-warnings")
scalafmtConfig in ThisBuild := Some(file(".scalafmt.conf"))
// dependencies
lazy val root = Project(
id = "fun-cqrs",
base = file("."),
settings = Seq(
publishArtifact := false
)
) aggregate (
funCqrs,
funCqrsAkka,
funCqrsTestKit,
lotteryApp
)
// Core ==========================================
lazy val funCqrs = Project(
id = "fun-cqrs-core",
base = file("modules/core"),
settings = defaultSettings
).settings(libraryDependencies ++= mainDeps)
//================================================
// Akka integration ==============================
lazy val funCqrsAkka = Project(
id = "fun-cqrs-akka",
base = file("modules/akka"),
settings = defaultSettings
).settings(libraryDependencies ++= mainDeps ++ akkaDeps)
.dependsOn (funCqrs % "compile->compile;test->test")
//================================================
//Test kit =======================================
lazy val funCqrsTestKit = Project(
id = "fun-cqrs-test-kit",
base = file("modules/tests"),
settings = defaultSettings
).settings(libraryDependencies ++= mainDeps ++ Seq(rxScala))
.dependsOn (funCqrs % "compile->compile;test->test")
//================================================
// #####################################################
// # SAMPLES #
// #####################################################
lazy val lotteryApp = Project(
id = "sample-lottery",
base = file("samples/lottery"),
settings = defaultSettings
).settings(libraryDependencies ++= sampleDeps)
.settings(publishArtifact := false)
.dependsOn(funCqrs)
.dependsOn(funCqrsTestKit)
.dependsOn(funCqrsAkka)
addCommandAlias("runLotteryAkka", "sample-lottery/runMain lottery.app.MainAkka")
addCommandAlias("runLotteryInMemory", "sample-lottery/runMain lottery.app.MainInMemory")