forked from theiterators/reactive-microservices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
196 lines (174 loc) · 5.63 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
import play.PlayScala
import sbt.Keys._
name := "reactive-microservices"
organization := "com.theiterators"
version := "1.0"
lazy val `reactive-microservices` = (project in file(".")).aggregate(metricsCommon, `metrics-collector`, `token-manager`,
`session-manager`, `identity-manager`, `auth-fb`, `auth-codecard`, `auth-password`, btcCommon, `btc-ws`, `btc-users`)
lazy val metricsCommon = (project in file("metrics-common")).settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
`akka-actor`,
`akka-stream`,
`akka-http-core`,
`akka-http-scala`,
`akka-http-spray`
),
Revolver.settings
)
lazy val `metrics-collector` = (project in file("metrics-collector")).dependsOn(metricsCommon).enablePlugins(PlayScala)
.settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
`akka-actor`,
`akka-stream`,
`akka-http-core`,
`akka-http-scala`,
`akka-http-spray`,
reactivemongo
),
Revolver.settings
)
lazy val `token-manager` = (project in file("token-manager")).dependsOn(metricsCommon).settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
`akka-actor`,
`akka-stream`,
`akka-http-core`,
`akka-http-scala`,
`akka-http-spray`,
reactivemongo
),
Revolver.settings
)
lazy val `session-manager` = (project in file("session-manager")).settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
`akka-actor`,
`akka-stream`,
`akka-http-core`,
`akka-http-scala`,
`akka-http-spray`
),
Revolver.settings
)
lazy val `identity-manager` = (project in file("identity-manager")).settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
`akka-actor`,
`akka-stream`,
`akka-http-core`,
`akka-http-scala`,
`akka-http-spray`,
slick,
postgresql
),
Revolver.settings
)
lazy val `auth-fb` = (project in file("auth-fb")).settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
`akka-actor`,
`akka-stream`,
`akka-http-core`,
`akka-http-scala`,
`akka-http-spray`,
rediscala,
restfb
),
Revolver.settings
)
lazy val `auth-codecard` = (project in file("auth-codecard")).settings(commonSettings: _*).settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
`akka-actor`,
`akka-stream`,
`akka-http-core`,
`akka-http-scala`,
`akka-http-spray`,
slick,
postgresql
),
Revolver.settings
)
lazy val `auth-password` = (project in file("auth-password")).settings(commonSettings: _*)
.settings(
libraryDependencies ++= Seq(
`akka-actor`,
`akka-stream`,
`akka-http-core`,
`akka-http-scala`,
`akka-http-spray`,
slick,
postgresql,
jbcrypt
),
Revolver.settings
)
lazy val btcCommon = (project in file("btc-common")).settings(commonSettings: _*).settings(libraryDependencies ++=
Seq(
`akka-actor`
)
)
lazy val `btc-ws` = (project in file("btc-ws")).dependsOn(btcCommon).enablePlugins(PlayScala).settings(commonSettings: _*)
.settings(libraryDependencies ++= Seq(
ws,
`akka-actor`,
`akka-remote`
)
)
lazy val `btc-users` = (project in file("btc-users")).dependsOn(btcCommon).settings(commonSettings: _*)
.settings(libraryDependencies ++= Seq(
`akka-contrib`,
`akka-actor`,
`akka-persistence`,
`play-ws`,
`play-json`
)
)
lazy val commonSettings = Seq(
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8"),
scalaVersion := "2.11.7",
resolvers ++= Seq("rediscala" at "http://dl.bintray.com/etaty/maven",
"Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/")
)
val akkaV = "2.3.10"
val playV = "2.3.8"
val akkaStreamV = "1.0-RC2"
val reactiveMongoV = "0.10.5.0.akka23"
val slickV = "2.1.0"
val postgresV = "9.3-1102-jdbc41"
val rediscalaV = "1.4.0"
val restFbV = "1.7.0"
val jbcryptV = "0.3m"
val `akka-actor` = "com.typesafe.akka" %% "akka-actor" % akkaV
val `akka-stream` = "com.typesafe.akka" %% "akka-stream-experimental" % akkaStreamV
val `akka-http-core` = "com.typesafe.akka" %% "akka-http-core-experimental" % akkaStreamV
val `akka-http-scala` = "com.typesafe.akka" %% "akka-http-scala-experimental" % akkaStreamV
val `akka-http-spray` = "com.typesafe.akka" %% "akka-http-spray-json-experimental" % akkaStreamV
val `akka-remote` = "com.typesafe.akka" %% "akka-remote" % akkaV
val `akka-contrib` = "com.typesafe.akka" %% "akka-contrib" % akkaV
val `akka-persistence` = "com.typesafe.akka" %% "akka-persistence-experimental" % akkaV
val reactivemongo = "org.reactivemongo" %% "reactivemongo" % reactiveMongoV
val slick = "com.typesafe.slick" %% "slick" % slickV
val postgresql = "org.postgresql" % "postgresql" % postgresV
val `play-ws` = "com.typesafe.play" %% "play-ws" % playV
val `play-json` = "com.typesafe.play" %% "play-json" % playV
val jbcrypt = "org.mindrot" % "jbcrypt" % jbcryptV
val rediscala = "com.etaty.rediscala" %% "rediscala" % rediscalaV
val restfb = "com.restfb" % "restfb" % restFbV
val runAll = inputKey[Unit]("Runs all subprojects")
runAll := {
(run in Compile in `token-manager`).evaluated
(run in Compile in `session-manager`).evaluated
(run in Compile in `identity-manager`).evaluated
(run in Compile in `auth-fb`).evaluated
(run in Compile in `auth-codecard`).evaluated
(run in Compile in `auth-password`).evaluated
(run in Compile in `btc-users`).evaluated
}
fork in run := true
// enables unlimited amount of resources to be used :-o just for runAll convenience
concurrentRestrictions in Global := Seq(
Tags.customLimit(_ => true)
)