forked from fun-cqrs/fun-cqrs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
82 lines (67 loc) · 2.43 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
import Dependencies._
import BuildSettings._
name := "fun-cqrs"
organization in ThisBuild := "io.strongtyped"
scalaVersion in ThisBuild := "2.12.11"
crossScalaVersions in ThisBuild := Seq("2.12.3", "2.13.2")
// replaces dynver + by -
version in ThisBuild ~= (_.replace('+', '-'))
scalacOptions := Seq("-unchecked", "-deprecation", "-feature", "-Xlint:-infer-any", "-Xfatal-warnings")
// dependencies
lazy val root = Project(
id = "fun-cqrs",
base = file("."),
).settings(
Seq(
publishArtifact := false
)
).aggregate (
funCqrs,
funCqrsAkka,
funCqrsTestKit,
raffleApp
)
// 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, reactiveStreamAdapter))
.dependsOn(funCqrs % "compile->compile;test->test")
//================================================
// #####################################################
// # SAMPLES #
// #####################################################
lazy val raffleApp = Project(
id = "sample-raffle",
base = file("samples/raffle")
).settings(defaultSettings)
.settings(libraryDependencies ++= sampleDeps)
.settings(publishArtifact := false)
.dependsOn(funCqrs)
.dependsOn(funCqrsTestKit)
.dependsOn(funCqrsAkka)
addCommandAlias("runRaffleAkka", "sample-raffle/runMain raffle.app.MainAkka")
addCommandAlias("runRaffleInMemory", "sample-raffle/runMain raffle.app.MainInMemory")
publishTo in ThisBuild := version { (v: String) =>
val nexus = "https://collab.mow.vlaanderen.be/artifacts/repository/"
if (v.trim.endsWith("SNAPSHOT"))
Some("collab snapshots" at nexus + "maven-snapshots")
else
Some("collab releases" at nexus + "maven-releases")
}.value