-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
142 lines (124 loc) · 4.53 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
import com.typesafe.sbt.SbtMultiJvm
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm
import sbt.Keys._
organization in ThisBuild := "com.interelgroup"
name in ThisBuild := "core3"
licenses in ThisBuild := Seq("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0"))
homepage in ThisBuild := Some(url("https://github.com/Interel-Group/core3"))
scalaVersion in ThisBuild := "2.12.3"
lazy val core3 = (project in file("."))
.settings(SbtMultiJvm.multiJvmSettings)
.settings(
crossScalaVersions := Seq("2.11.11", "2.12.3"),
resolvers ++= Seq(
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/releases",
"lightshed-maven" at "http://dl.bintray.com/content/lightshed/maven"
),
libraryDependencies ++= Seq(
dependencies_base,
dependencies_slick,
dependencies_cli map (_ % Optional),
dependencies_mariaDB map (_ % Optional),
dependencies_redis map (_ % Optional),
dependencies_elastic map (_ % Optional),
dependencies_mail map (_ % Optional),
dependencies_distributedCache map (_ % Optional),
dependencies_mariaDB map (_ % MultiJvm),
dependencies_distributedCache map (_ % MultiJvm),
dependencies_meta map (_ % Test),
dependencies_test map (_ % Test)
).flatten,
macroSettings,
compile in MultiJvm := ((compile in MultiJvm) triggeredBy (compile in Test)).value,
executeTests in Test := {
val testResults = (executeTests in Test).value
val multiNodeResults = (executeTests in MultiJvm).value
Tests.Output(
if (testResults.overall.id < multiNodeResults.overall.id) {
multiNodeResults.overall
} else {
testResults.overall
},
testResults.events ++ multiNodeResults.events,
testResults.summaries ++ multiNodeResults.summaries
)
},
testFrameworks in Test += new TestFramework("org.scalameter.ScalaMeterFramework"),
logBuffered in Test := false,
parallelExecution in Test := false
)
.configs(MultiJvm)
.dependsOn(meta)
.aggregate(meta)
//Meta Settings
lazy val macroSettings = Seq(
addCompilerPlugin("org.scalameta" % "paradise" % "3.0.0-M10" cross CrossVersion.full),
scalacOptions += "-Xplugin-require:macroparadise",
scalacOptions in (Compile, console) := Seq()
)
lazy val meta = (project in file("meta"))
.settings(
libraryDependencies ++= Seq(
dependencies_meta map (_ % Provided),
dependencies_test map (_ % Test),
dependencies_meta_test map (_ % Test)
).flatten,
macroSettings,
logBuffered in Test := false,
parallelExecution in Test := false
)
//Dependency Definitions
lazy val akkaVersion = "2.5.4"
lazy val dependencies_base = Seq(
"com.fasterxml.jackson.core" % "jackson-databind" % "2.9.1",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.9.0",
"com.typesafe.play" %% "play-logback" % "2.6.3",
"com.typesafe.play" %% "play-json" % "2.6.3",
ehcache,
ws,
filters,
"com.pauldijou" %% "jwt-play-json" % "0.14.0",
"com.roundeights" %% "hasher" % "1.2.0"
)
lazy val dependencies_meta = Seq(
"org.scalameta" %% "scalameta" % "1.8.0"
)
lazy val dependencies_meta_test = Seq(
"org.scalameta" %% "testkit" % "1.8.0"
)
lazy val dependencies_slick = Seq(
jdbc,
"com.chuusai" %% "shapeless" % "2.3.2",
"com.typesafe.slick" %% "slick" % "3.2.1",
"io.underscore" %% "slickless" % "0.3.2"
)
lazy val dependencies_cli = Seq(
"org.jline" % "jline" % "3.2.0",
"com.github.scopt" %% "scopt" % "3.5.0"
)
lazy val dependencies_mariaDB = Seq(
"org.mariadb.jdbc" % "mariadb-java-client" % "2.1.1"
)
lazy val dependencies_redis = Seq(
"com.github.etaty" %% "rediscala" % "1.8.0"
)
lazy val dependencies_elastic = Seq(
"com.sksamuel.elastic4s" %% "elastic4s-core" % "5.5.3",
"com.sksamuel.elastic4s" %% "elastic4s-tcp" % "5.5.3"
)
lazy val dependencies_mail = Seq(
"ch.lightshed" %% "courier" % "0.1.4"
)
lazy val dependencies_distributedCache = Seq(
"com.typesafe.akka" %% "akka-cluster" % akkaVersion,
"com.typesafe.akka" %% "akka-cluster-tools" % akkaVersion,
"com.github.blemale" %% "scaffeine" % "2.2.0"
)
lazy val dependencies_test = Seq(
"org.scalacheck" %% "scalacheck" % "1.13.5",
"org.scalatest" %% "scalatest" % "3.0.4",
"com.storm-enroute" %% "scalameter" % "0.8.2",
"com.typesafe.akka" %% "akka-multi-node-testkit" % akkaVersion,
"org.jvnet.mock-javamail" % "mock-javamail" % "1.9",
"org.scalatestplus.play" %% "scalatestplus-play" % "3.1.1"
)