-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
102 lines (94 loc) · 2.91 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
publishArtifact := false
val componentVersion = "1.1.0"
organization := "org.dmonix"
version := componentVersion
val baseSettings = Seq(
organization := "org.dmonix",
version := componentVersion,
scalaVersion := "2.13.10",
crossScalaVersions := Seq("2.11.12", "2.12.17", "2.13.10"),
scalacOptions := Seq(
"-feature",
"-language:postfixOps",
"-language:implicitConversions",
"-unchecked",
"-deprecation",
"-encoding",
"utf8"
),
libraryDependencies ++= Seq(
`spray-json`,
`slf4j-api`,
`specs2-core` % "test",
`specs2-mock` % "test",
`specs2-junit` % "test",
`specs2-matcher-extra` % "test",
`akka-http` % "test",
`akka-actor` % "test",
`akka-stream` % "test",
`logback-classic` % "test"
)
)
val integrationSettings = Seq(
publishArtifact := false,
publishArtifact in (Compile, packageBin) := false,
publishArtifact in (Compile, packageDoc) := false,
publishArtifact in (Compile, packageSrc) := false,
fork := true,
libraryDependencies ++= Seq(
`logback-classic`
)
)
// ======================================================
// Shared code between the recipes and simulator
// ======================================================
lazy val common = (project in file("consul-common"))
.settings(baseSettings)
.settings(
name := "consul-common"
)
// ======================================================
// The "main" project with the recipes
// ======================================================
lazy val recipes = (project in file("consul-recipes"))
.settings(baseSettings)
.settings(
name := "consul-recipes"
)
.dependsOn(common, sim)
// ======================================================
// The Consul simulator
// ======================================================
lazy val sim = (project in file("consul-sim"))
.settings(baseSettings)
.settings(
name := "consul-sim",
libraryDependencies ++= Seq(
`akka-http`,
`akka-actor`,
`akka-stream`,
`akka-stream-testkit` % "test",
`akka-http-testkit` % "test"
)
)
.dependsOn(common)
// ======================================================
// Only used to run local integration testing for the election
// ======================================================
lazy val integrationElection = (project in file("integration-election"))
.settings(baseSettings)
.settings(integrationSettings)
.settings(
mainClass in (Compile, run) := Some("org.dmonix.consul.ManualLeaderElection")
)
.dependsOn(recipes)
// ======================================================
// Only used to run local integration testing for the Semaphore
// ======================================================
lazy val integrationSemaphore = (project in file("integration-semaphore"))
.settings(baseSettings)
.settings(integrationSettings)
.settings(
mainClass in (Compile, run) := Some("org.dmonix.consul.ManualSemaphore")
)
.dependsOn(recipes)