forked from playframework/play-socket.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
125 lines (114 loc) · 4.57 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
import play.core.PlayVersion.{ current => playVersion }
import interplay.ScalaVersions._
val scala211 = "2.11.12"
val AkkaVersion = "2.5.26"
lazy val runChromeWebDriver = taskKey[Unit]("Run the chromewebdriver tests")
val macwire = "com.softwaremill.macwire" %% "macros" % "2.3.3"
val lombok = "org.projectlombok" % "lombok" % "1.18.8"
val akkaCluster = Seq(
"com.typesafe.akka" %% "akka-cluster" % AkkaVersion,
"com.typesafe.akka" %% "akka-cluster-tools" % AkkaVersion
)
playBuildRepoName in ThisBuild := "play-socket.io"
sonatypeProfileName in ThisBuild := "com.lightbend"
lazy val root = (project in file("."))
.enablePlugins(PlayReleaseBase, PlayLibrary)
.settings(
organization := "com.lightbend.play",
name := "play-socket-io",
crossScalaVersions := Seq(scala212, scala211),
scalacOptions ++= Seq("-feature", "-Xfatal-warnings", "-target:jvm-1.8"),
scalacOptions in (Compile, doc) := Nil,
javacOptions ++= Seq("-Xlint"),
libraryDependencies ++= Seq(
// Production dependencies
"com.typesafe.play" %% "play" % playVersion,
"com.typesafe.akka" %% "akka-remote" % AkkaVersion,
// Test dependencies for running a Play server
"com.typesafe.play" %% "play-akka-http-server" % playVersion % Test,
"com.typesafe.play" %% "play-logback" % playVersion % Test,
// Test dependencies for Scala/Java dependency injection
"com.typesafe.play" %% "play-guice" % playVersion % Test,
macwire % Test,
// Test dependencies for running chrome driver
"org.seleniumhq.selenium" % "selenium-chrome-driver" % "3.141.59",
// Test framework dependencies
"org.scalatest" %% "scalatest" % "3.0.8" % Test,
"com.novocode" % "junit-interface" % "0.11" % Test
),
PB.targets in Compile := Seq(
scalapb.gen() -> (sourceManaged in Compile).value
),
fork in Test := true,
connectInput in (Test, run) := true,
runChromeWebDriver := {
(runMain in Test).toTask(" play.socketio.RunSocketIOTests").value
},
TaskKey[Unit]("runJavaServer") :=
(runMain in Test).toTask(" play.socketio.javadsl.TestSocketIOJavaApplication").value,
TaskKey[Unit]("runScalaServer") :=
(runMain in Test).toTask(" play.socketio.scaladsl.TestSocketIOScalaApplication").value,
TaskKey[Unit]("runMultiNodeServer") :=
(runMain in Test).toTask(" play.socketio.scaladsl.TestMultiNodeSocketIOApplication").value,
test in Test := {
(test in Test).value
runChromeWebDriver.value
},
resolvers += "jitpack".at("https://jitpack.io"),
headerLicense := Some(HeaderLicense.Custom("Copyright (C) 2017-2019 Lightbend Inc. <https://www.lightbend.com>")),
headerEmptyLine := false
)
lazy val scalaChat = (project in file("samples/scala/chat"))
.enablePlugins(PlayScala)
.dependsOn(root)
.settings(
name := "play-socket.io-scala-chat-example",
organization := "com.lightbend.play",
scalaVersion := scala212,
libraryDependencies += macwire % Provided
)
lazy val scalaMultiRoomChat = (project in file("samples/scala/multi-room-chat"))
.enablePlugins(PlayScala)
.dependsOn(root)
.settings(
name := "play-socket.io-scala-multi-room-chat-example",
organization := "com.lightbend.play",
scalaVersion := scala212,
libraryDependencies += macwire % Provided
)
lazy val scalaClusteredChat = (project in file("samples/scala/clustered-chat"))
.enablePlugins(PlayScala)
.dependsOn(root)
.settings(
name := "play-socket.io-scala-clustered-chat-example",
organization := "com.lightbend.play",
scalaVersion := scala212,
libraryDependencies ++= Seq(macwire % Provided) ++ akkaCluster
)
lazy val javaChat = (project in file("samples/java/chat"))
.enablePlugins(PlayJava)
.dependsOn(root)
.settings(
name := "play-socket.io-java-chat-example",
organization := "com.lightbend.play",
scalaVersion := scala212,
libraryDependencies += guice
)
lazy val javaMultiRoomChat = (project in file("samples/java/multi-room-chat"))
.enablePlugins(PlayJava)
.dependsOn(root)
.settings(
name := "play-socket.io-java-multi-room-chat-example",
organization := "com.lightbend.play",
scalaVersion := scala212,
libraryDependencies ++= Seq(guice, lombok)
)
lazy val javaClusteredChat = (project in file("samples/java/clustered-chat"))
.enablePlugins(PlayJava)
.dependsOn(root)
.settings(
name := "play-socket.io-java-clustered-chat-example",
organization := "com.lightbend.play",
scalaVersion := scala212,
libraryDependencies ++= Seq(guice, lombok) ++ akkaCluster
)