-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
44 lines (40 loc) · 1.2 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
import sbt._
import sbt.Keys._
import spray.revolver.RevolverPlugin.Revolver
lazy val commonSettings = Seq(
version := Settings.version,
scalaVersion := Settings.versions.scalaV,
scalacOptions ++= Settings.scalacOptions
)
// Akka Http agent
lazy val agent =
(project in file("agent"))
.settings(commonSettings: _*)
.settings(
name := "metrics-visualizer-agent",
mainClass in Compile := Some("agent.Boot"),
mainClass in Revolver.reStart := Some("agent.Boot"),
libraryDependencies ++= Settings.commonDependencies.value
)
// Akka Http server
lazy val server =
(project in file("server"))
.settings(commonSettings: _*)
.settings(Revolver.settings: _*)
.settings(
name := "metrics-visualizer-server",
libraryDependencies ++= Settings.serverDependencies.value,
mainClass in Compile := Some("server.Boot"),
// webapp task
resourceGenerators in Compile <+=
(resourceManaged, baseDirectory, streams) map { (managedBase, base, _) =>
val webappBase = base / "src" / "main" / "webapp"
for {
(from, to) <- webappBase ** "*" pair rebase(webappBase, managedBase / "main" / "webapp")
} yield {
Sync.copy(from, to)
to
}
}
)
fork in run := true