-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
113 lines (92 loc) · 4.31 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
import sbt.Runtime
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / scalaVersion := "2.13.7"
lazy val akkaVersion = "2.6.18"
lazy val slickVersion = "3.3.3"
lazy val akkaHttpVersion = "10.2.6"
lazy val leveldbVersion = "0.12"
lazy val leveldbjniVersion = "1.8"
lazy val postgresVersion = "42.2.2"
lazy val cassandraVersion = "0.91"
lazy val json4sVersion = "3.2.11"
lazy val protobufVersion = "3.6.1"
// some libs are available in Bintray's JCenter
//resolvers += Resolver.jcenterRepo
lazy val commonSettings = Seq(
libraryDependencies ++= Seq(
"org.scalactic" %% "scalactic" % "3.2.9",
"ch.qos.logback" % "logback-classic" % "1.5.6" % Runtime,
"org.scalatest" %% "scalatest" % "3.2.9" % Test,
"com.softwaremill.macwire" %% "macros" % "2.5.2" % Provided
)
)
lazy val rootDependencies = Seq(
//for core akka
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-testkit" % akkaVersion,
//for akka streams
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test,
// for akka remoting
"com.typesafe.akka" %% "akka-remote" % akkaVersion,
//for udp aeron
//"io.aeron" % "aeron-driver" % "1.37.0",
//"io.aeron" % "aeron-client" % "1.37.0",
// for akka clustering
"com.typesafe.akka" %% "akka-cluster" % akkaVersion,
"com.typesafe.akka" %% "akka-cluster-sharding" % akkaVersion,
"com.typesafe.akka" %% "akka-cluster-tools" % akkaVersion,
"com.typesafe.akka" %% "akka-cluster-typed" % akkaVersion,
//for akka persistence
"com.typesafe.akka" %% "akka-persistence" % akkaVersion,
// local levelDB stores
"org.iq80.leveldb" % "leveldb" % leveldbVersion,
"org.fusesource.leveldbjni" % "leveldbjni-all" % leveldbjniVersion,
/*
// JDBC with PostgreSQL
"org.postgresql" % "postgresql" % postgresVersion,
"com.github.dnvriend" %% "akka-persistence-jdbc" % "3.4.0",
// Cassandra
"com.typesafe.akka" %% "akka-persistence-cassandra" % cassandraVersion,
"com.typesafe.akka" %% "akka-persistence-cassandra-launcher" % cassandraVersion % Test,
*/
// Google Protocol Buffers
"com.google.protobuf" % "protobuf-java" % protobufVersion,
"org.scalatest" %% "scalatest" % "3.2.9" % Test,
"org.zeromq" % "jeromq" % "0.5.3",
)
lazy val databaseDependencies = Seq(
"com.typesafe.slick" %% "slick" % slickVersion,
"com.typesafe.slick" %% "slick-hikaricp" % slickVersion,
"org.postgresql" % "postgresql" % "42.3.1",
)
lazy val akkaDependencies = Seq(
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"com.typesafe.akka" %% "akka-actor-typed" % akkaVersion,
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-core" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test,
"com.typesafe.akka" %% "akka-actor-testkit-typed" % "2.6.18" % Test,
)
lazy val userService = (project in file("userService"))
.settings(
name := "user_service",
commonSettings,
libraryDependencies ++= akkaDependencies ++ databaseDependencies
)
lazy val contestService = (project in file("contestService"))
.settings(
name := "contest_service",
commonSettings,
libraryDependencies ++= akkaDependencies ++ databaseDependencies
)
lazy val root = (project in file("."))
.settings(
name := "contest",
commonSettings,
idePackagePrefix := Some("com.ab"),
libraryDependencies ++= rootDependencies ++ akkaDependencies
)