-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
164 lines (141 loc) · 3.75 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
import play.sbt._
import play.sbt.PlayImport._
import play.sbt.routes.RoutesKeys._
import sbt.Keys._
import sbt._
import Dependencies._
import com.typesafe.sbt.packager.archetypes.JavaAppPackaging
lazy val commonSettings = Configuration.settings
lazy val aggregatedProjects: Seq[ProjectReference] = Seq(core, http, mqtt, clusterSeed)
lazy val root = Project(
id = "wings",
base = file("."),
aggregate = aggregatedProjects,
settings = commonSettings
)
lazy val scalaGraph = Project(
id = "scala-graph",
base = file("scala-graph")
)
lazy val core = Project(
id = "wings-core",
base = file("wings-core"),
settings = commonSettings,
dependencies = Seq(scalaGraph)
).settings(coreDependencies: _*)
lazy val coreDependencies = Seq(
libraryDependencies ++= Seq(
scaldi,
akkaCluster,
akkaClusterTools,
akkaClusterMetrics,
playJson,
playReactiveMongo,
akkaSlf4j,
scalaLogging,
logback,
scalactic
))
lazy val http = Project(
id = "wings-http",
base = file("wings-http"),
settings = commonSettings,
dependencies = Seq(core)
).enablePlugins(PlayScala)
.settings(httpDependencies: _*)
.settings(routesGenerator := InjectedRoutesGenerator, fork in sbt.Keys.run := false)
lazy val httpDependencies = Seq(
libraryDependencies ++= Seq(
jdbc,
cache,
ws,
filters,
playReactiveMongo,
akkaRemote
))
lazy val mqtt = Project(
id = "wings-mqtt",
base = file("wings-mqtt"),
settings = commonSettings,
dependencies = Seq(core)
).settings(mqttDependencies: _*)
.enablePlugins(JavaAppPackaging)
lazy val mqttDependencies = Seq(
libraryDependencies ++= Seq(
akkaActor,
akkaRemote,
akkaCluster,
akkaClusterTools,
akkaClusterMetrics,
playReactiveMongo,
playJson,
slf4j,
eclipsePaho
))
lazy val coap = Project(
id = "wings-coap",
base = file("wings-coap"),
settings = commonSettings,
dependencies = Seq(core)
).settings(coapDependencies: _*)
.enablePlugins(JavaAppPackaging)
lazy val coapDependencies = Seq(
libraryDependencies ++= Seq(
akkaActor,
akkaRemote,
akkaCluster,
akkaClusterTools,
akkaClusterMetrics,
playReactiveMongo,
playJson,
slf4j,
californium
))
lazy val clusterSeed = Project(
id = "wings-clusterseed",
base = file("wings-clusterseed"),
settings = commonSettings,
dependencies = Seq(core)
).settings(clusterSeedDependencies: _*)
.enablePlugins(JavaAppPackaging)
lazy val clusterSeedDependencies = Seq(
libraryDependencies ++= Seq(
akkaCluster,
akkaClusterTools,
akkaClusterMetrics
))
lazy val test = Project(
id = "wings-test",
base = file("wings-test"),
settings = commonSettings,
dependencies = Seq(core, mqtt)
).settings(testDependencies)
.enablePlugins(JavaAppPackaging)
.settings(mainClass in (Compile) := Some("wings.demo1.Demo1"))
lazy val testDependencies = Seq(
libraryDependencies ++= Seq(
playWs,
playJson,
eclipsePaho,
akkaActor,
akkaRemote,
akkaTestKit,
playReactiveMongo24,
typesafeConfig,
jettyWebSocket,
akkaSlf4j,
scalatest
)
)
/** ********* COMMANDS ALIASES ******************/
addCommandAlias("t", "test")
addCommandAlias("to", "testOnly")
addCommandAlias("tq", "testQuick")
addCommandAlias("tsf", "testShowFailed")
addCommandAlias("c", "compile")
addCommandAlias("tc", "test:compile")
addCommandAlias("s", "scalastyle")
addCommandAlias("ts", "test:scalastyle")
addCommandAlias("f", "scalafmt") // Format all files according to ScalaFmt
addCommandAlias("ft", "scalafmtTest") // Test if all files are formatted according to ScalaFmt
addCommandAlias("prep", ";c;tc;s;ts;ft") // All the needed tasks before running the test