forked from pawelkaczor/akka-ddd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
136 lines (107 loc) · 4.48 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import Deps._
import Deps.TestFrameworks._
import sbt.Keys._
import java.net.URL
name := "akka-ddd"
version in ThisBuild := "1.2.3-SNAPSHOT"
organization in ThisBuild := "pl.newicom.dddd"
scalaVersion in ThisBuild := "2.11.7"
scalacOptions in ThisBuild := Seq("-encoding", "utf8", "-deprecation", "-feature", "-language:postfixOps")
publishMavenStyle in ThisBuild := true
homepage in ThisBuild := Some(new URL("http://github.com/pawelkaczor/akka-ddd"))
licenses in ThisBuild := ("Apache2", new URL("http://raw.githubusercontent.com/pawelkaczor/akka-ddd/master/LICENSE.md")) :: Nil
lazy val root = (project in file("."))
.aggregate(`akka-ddd-messaging`, `akka-ddd-monitoring`, `akka-ddd-core`, `akka-ddd-write-front`, `view-update`, `view-update-sql`, `akka-ddd-test`, `eventstore-akka-persistence`, `http-support`, `akka-ddd-scheduling`)
.settings(
commonSettings,
publishArtifact := false
)
lazy val `akka-ddd-messaging` = project
.settings(
commonSettings,
scalacOptions ++= Seq("-language:implicitConversions"),
libraryDependencies ++= Json.`4s` ++ Seq(Akka.stream, nscalaTime)
)
lazy val `akka-ddd-core` = project
.settings(
commonSettings,
scalacOptions ++= Seq("-language:implicitConversions"),
publishArtifact in Test := true,
libraryDependencies ++= Seq(
Akka.clusterTools, Akka.clusterSharding, Akka.persistence, Akka.contributions, Akka.slf4j
))
.dependsOn(`akka-ddd-messaging`)
lazy val `akka-ddd-write-front` = project
.settings(
commonSettings,
publishArtifact in Test := true,
libraryDependencies ++= Seq(
Akka.clusterTools, Akka.slf4j
))
.dependsOn(`http-support`)
lazy val `view-update` = project
.settings(
commonSettings
).dependsOn(`akka-ddd-messaging`)
lazy val `view-update-sql` = project
.configs(IntegrationTest)
.settings(
commonSettings,
scalacOptions ++= Seq("-language:existentials", "-language:implicitConversions"),
inConfig(IntegrationTest)(Defaults.testTasks),
testOptions in Test := Seq(Tests.Filter(specFilter)),
testOptions in IntegrationTest := Seq(Tests.Filter(integrationFilter)),
parallelExecution in IntegrationTest := false,
libraryDependencies ++= SqlDb() ++ Seq(
scalaTest % "test", Akka.testkit % "test",
logbackClassic % "test", scalaCheck % "test"
))
.dependsOn(`view-update`, `akka-ddd-test` % "test->compile;test->test", `eventstore-akka-persistence` % "test->compile")
lazy val `akka-ddd-test` = project
.configs(IntegrationTest)
.settings(
commonSettings,
scalacOptions ++= Seq("-language:implicitConversions"),
inConfig(IntegrationTest)(Defaults.testTasks),
testOptions in Test := Seq(Tests.Filter(specFilter)),
testOptions in IntegrationTest := Seq(Tests.Filter(integrationFilter)),
parallelExecution in IntegrationTest := false,
libraryDependencies ++= levelDB ++ Seq(
Akka.testkit, Akka.multiNodeTestkit, scalaCheck, scalaTest, commonIO, logbackClassic % "test"
))
.dependsOn(`akka-ddd-core`, `eventstore-akka-persistence` % "test->compile")
lazy val `eventstore-akka-persistence` = project
.settings(
commonSettings,
libraryDependencies ++= Json.`4s` ++ Seq(
Eventstore.client, Eventstore.akkaJournal,
Akka.slf4j, Akka.persistence
))
.dependsOn(`akka-ddd-messaging`)
lazy val `http-support` = project
.settings(
commonSettings,
scalacOptions ++= Seq("-language:implicitConversions"),
libraryDependencies ++= Akka.http
).dependsOn(`akka-ddd-messaging`)
lazy val `akka-ddd-scheduling` = project
.settings(
commonSettings,
libraryDependencies ++= Seq(
Akka.testkit % "test", scalaCheck % "test",
logbackClassic % "test"
))
.dependsOn(`akka-ddd-core`, `eventstore-akka-persistence`, `akka-ddd-test` % "test->compile;test->test")
lazy val `akka-ddd-monitoring` = project
.settings(
commonSettings,
libraryDependencies += Kamon.core
).dependsOn(`akka-ddd-core`)
lazy val commonSettings: Seq[Setting[_]] = Publish.settings ++ Seq(
updateOptions := updateOptions.value.withCachedResolution(cachedResoluton = true),
licenses := Seq("MIT" -> url("http://raw.github.com/pawelkaczor/akka-ddd/master/LICENSE.md")),
startYear := Some(2014)
)
lazy val IntegrationTest = config("it") extend Test
def integrationFilter(name: String): Boolean = name endsWith "IntegrationSpec"
def specFilter(name: String): Boolean = (name endsWith "Spec") && !integrationFilter(name)