This repository has been archived by the owner on May 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
/
build.sbt
94 lines (73 loc) · 2.64 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
import ByteConversions._
name := "reactive-maps"
organization in ThisBuild := "com.typesafe"
version := "1.0-SNAPSHOT"
licenses := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
libraryDependencies ++= Seq(
TypesafeLibrary.akkaOrganization %% "akka-contrib" % "2.3.11",
"com.typesafe.play.extras" %% "play-geojson" % "1.3.0",
"org.webjars" % "bootstrap" % "3.0.0",
"org.webjars" % "knockout" % "2.3.0",
"org.webjars" % "requirejs" % "2.1.11-1",
"org.webjars" % "leaflet" % "0.7.2",
"org.webjars" % "rjs" % "2.1.11-1-trireme" % "test",
"org.webjars" % "squirejs" % "0.1.0" % "test"
)
routesGenerator := InjectedRoutesGenerator
scalacOptions += "-feature"
MochaKeys.requires += "SetupMocha.js"
pipelineStages := Seq(rjs, digest, gzip)
// Main bundle configuration
normalizedName in Bundle := "reactive-maps-frontend"
BundleKeys.system := "reactive-maps"
BundleKeys.endpoints := Map(
"web" -> Endpoint("http", 0, serviceName = "reactive-maps-frontend", acls =
RequestAcl(
Http(
"^/".r
)
)
),
"akka-remote" -> Endpoint("tcp", 0)
)
BundleKeys.roles := Set("dmz")
BundleKeys.startCommand += "-Dakka.cluster.roles.1=frontend"
// Bundles that override the main one
lazy val BackendRegion = config("backend-region").extend(Bundle)
BundlePlugin.bundleSettings(BackendRegion)
inConfig(BackendRegion)(Seq(
normalizedName := "reactive-maps-backend-region",
BundleKeys.endpoints := Map("akka-remote" -> Endpoint("tcp")),
BundleKeys.roles := Set("intranet"),
BundleKeys.startCommand :=
Seq((BundleKeys.executableScriptPath in BackendRegion).value) ++
(javaOptions in BackendRegion).value ++
Seq(
"-Dakka.cluster.roles.1=backend-region",
"-main", "backend.Main"
)
))
lazy val BackendSummary = config("backend-summary").extend(BackendRegion)
BundlePlugin.bundleSettings(BackendSummary)
inConfig(BackendSummary)(Seq(
normalizedName := "reactive-maps-backend-summary",
BundleKeys.startCommand :=
Seq((BundleKeys.executableScriptPath in BackendSummary).value) ++
(javaOptions in BackendSummary).value ++
Seq(
"-Dakka.cluster.roles.1=backend-summary",
"-main", "backend.Main"
)
))
// Bundle publishing configuration
inConfig(Bundle)(Seq(
bintrayVcsUrl := Some("https://github.com/typesafehub/ReactiveMaps"),
bintrayOrganization := Some("typesafe")
))
BintrayBundle.settings(BackendRegion)
BintrayBundle.settings(BackendSummary)
// Root project
lazy val root = (project in file("."))
.enablePlugins(PlayScala)
.configs(BackendRegion, BackendSummary)