-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
112 lines (94 loc) · 3.28 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
lazy val sharedSettings = Seq(
name := "flashbook-server",
organization := "io.flashbook",
version := "0.1-SNAPSHOT",
scalaVersion := "2.11.8"
)
lazy val akkaVersion = "2.5.11"
lazy val akkaHttpVersion = "10.1.0"
lazy val circeVersion = "0.9.0"
lazy val akkaDeps = List(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test,
// Persistent storage
"com.typesafe.akka" %% "akka-persistence" % akkaVersion,
"org.fusesource.leveldbjni" % "leveldbjni-all" % "1.8",
"com.github.andyglow" %% "websocket-scala-client" % "0.2.4" % Compile,
"de.heikoseeberger" %% "akka-http-circe" % "1.20.0"
// Serialization
// "com.github.romix.akka" %% "akka-kryo-serialization" % "0.5.0"
)
lazy val testDeps = List(
"org.scalactic" %% "scalactic" % "3.0.5",
"org.scalatest" %% "scalatest" % "3.0.5" % "test"
)
lazy val graphQLDeps = List(
"org.sangria-graphql" %% "sangria" % "1.4.0",
"org.sangria-graphql" %% "sangria-circe" % "1.2.1",
"org.sangria-graphql" %% "sangria-akka-streams" % "1.0.0"
)
lazy val jsonDeps = List(
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"io.circe" %% "circe-optics" % circeVersion
)
lazy val dataStores = List(
"net.openhft" % "chronicle-queue" % "4.6.73",
"net.openhft" % "chronicle-map" % "3.14.5"
)
lazy val server = project
.in(file("server"))
.settings(sharedSettings: _*)
.settings(name := "flashbook-server")
.settings(libraryDependencies ++= (akkaDeps ++ jsonDeps ++ graphQLDeps ++ dataStores ++ testDeps))
.dependsOn(common)
.aggregate(common)
//lazy val ui = project
// .in(file("ui"))
// .settings(sharedSettings: _*)
// .settings(name := "doomsday-ui")
// .settings(mainClass in Compile := Some("ui.Main"))
// .settings(scalaJSUseMainModuleInitializer in Compile := true)
// .enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
// .settings(npmDependencies in Compile ++= Seq(
// "react" -> "16.2.0",
// "react-dom" -> "16.2.0"
// ))
// .dependsOn(common)
// .aggregate(common)
lazy val common = project
.in(file("common"))
.settings(sharedSettings: _*)
.settings(libraryDependencies ++= akkaDeps ++ jsonDeps ++ graphQLDeps ++ dataStores ++ testDeps)
lazy val root = project.in(file("."))
.settings(sharedSettings: _*)
.aggregate(server)
//lazy val root = project.in(file("."))
// .aggregate(doomsdayJS, doomsdayJVM)
// .settings(
// publish := {},
// publishLocal := {}
// )
//lazy val doomsday = crossProject.in(file("."))
// .settings(
// name := "doomsday",
// version := "0.1-SNAPSHOT"
//// scalaJSUseMainModuleInitializer := true
// )
// .jvmSettings(
// libraryDependencies ++= (akkaDeps ++ Seq(
// "org.scalactic" %% "scalactic" % "3.0.5",
// "org.scalatest" %% "scalatest" % "3.0.5" % "test",
// "org.sangria-graphql" %% "sangria" % "1.4.0"
// ))
// )
// .jvmSettings(moduleName := "jvm")
// .jsSettings(
// libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "0.9.1"
// )
// .jsSettings(moduleName := "js")
//lazy val doomsdayJS = doomsday.js
//lazy val doomsdayJVM = doomsday.jvm