-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
82 lines (68 loc) · 2.39 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
import Settings._
import scoverage.ScoverageSbtPlugin
import scala.Console._
lazy val commonSettings = Seq(
name := "ReactiveExample",
version := "1.0"
)
lazy val pcs =
(project in file ("."))
.settings(commonSettings)
.settings(modulesSettings)
.settings(
fork in run := true,
mainClass in (Compile, run) := Some("Main")
)
.settings(
scalacOptions ++= Seq(
"-feature",
"-unchecked",
"-language:higherKinds",
"-language:postfixOps",
"-deprecation"
)
)
.enablePlugins(ScoverageSbtPlugin)
.settings(
coverageMinimum := 1,
coverageFailOnMinimum := true,
addCommandAlias("testc",
";'set coverageEnabled := true';clean;coverage;test;coverageReport"
)
)
.settings(
Test / parallelExecution := false,
Test / fork := true,
Test / javaOptions += "-Xmx2G",
coverageExcludedPackages := "router.Routes.*;<empty>;Reverse.*;router\\.*"
)
.settings(
triggeredMessage := Watched.clearWhenTriggered,
autoStartServer := false,
shellPrompt := (_ => fancyPrompt(name.value))
)
.enablePlugins(JavaServerAppPackaging)
// Command Aliases
addCommandAlias("cd", "project")
addCommandAlias("ls", "projects")
addCommandAlias("to", "testOnly *")
addCommandAlias("main", "run -Dakka.cluster.seed-nodes.0=akka://[email protected]:2551")
addCommandAlias("produce", "runMain transaction.ProducerApp")
def cyan(projectName: String): String = CYAN + projectName + RESET
def fancyPrompt(projectName: String): String =
s"""|
|[info] Welcome to the ${cyan(projectName)} project!
|sbt> """.stripMargin
// TODO ORDER
// Experimental
libraryDependencies += "com.typesafe.akka" %% "akka-stream-kafka" % "1.0-M1"
libraryDependencies += "com.typesafe.akka" %% "akka-stream-testkit" % "2.5.25" % Test
libraryDependencies += "com.typesafe.akka" %% "akka-stream-kafka-testkit" % "1.0.5"
val circeVersion = "0.11.1"
libraryDependencies ++= Seq(
"io.circe" %% "circe-core",
"io.circe" %% "circe-generic",
"io.circe" %% "circe-parser"
).map(_ % circeVersion)
libraryDependencies += "com.typesafe.play" %% "play-json" % "2.7.3"
libraryDependencies += "commons-io" % "commons-io" % "2.6"