forked from softwaremill/akka-http-session
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
77 lines (70 loc) · 2.66 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
lazy val commonSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq(
organization := "com.softwaremill.akka-http-session",
scalaVersion := "2.12.12",
crossScalaVersions := Seq(scalaVersion.value, "2.13.4")
)
val akkaHttpVersion = "10.2.1"
val akkaStreamsVersion = "2.6.10"
val json4sVersion = "3.6.10"
val akkaStreamsProvided = "com.typesafe.akka" %% "akka-stream" % akkaStreamsVersion % "provided"
val akkaStreamsTestkit = "com.typesafe.akka" %% "akka-stream-testkit" % akkaStreamsVersion % "test"
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.3" % "test"
lazy val rootProject = (project in file("."))
.settings(commonSettings: _*)
.settings(publishArtifact := false, name := "akka-http-session")
.aggregate(core, jwt, example, javaTests)
lazy val core: Project = (project in file("core"))
.settings(commonSettings: _*)
.settings(
name := "core",
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
akkaStreamsProvided,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "test",
akkaStreamsTestkit,
"org.scalacheck" %% "scalacheck" % "1.15.1" % "test",
scalaTest
)
)
lazy val jwt: Project = (project in file("jwt"))
.settings(commonSettings: _*)
.settings(
name := "jwt",
libraryDependencies ++= Seq(
"org.json4s" %% "json4s-jackson" % json4sVersion,
akkaStreamsProvided,
scalaTest
),
// generating docs for 2.13 causes an error: "not found: type DefaultFormats$"
sources in (Compile, doc) := Seq.empty
) dependsOn (core)
lazy val example: Project = (project in file("example"))
.settings(commonSettings: _*)
.settings(
publishArtifact := false,
libraryDependencies ++= Seq(
akkaStreamsProvided,
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",
"ch.qos.logback" % "logback-classic" % "1.2.3",
"org.json4s" %% "json4s-ext" % json4sVersion
)
)
.dependsOn(core, jwt)
lazy val javaTests: Project = (project in file("javaTests"))
.settings(commonSettings: _*)
.settings(
name := "javaTests",
testOptions in Test := Seq(Tests.Argument(TestFrameworks.JUnit, "-a")), // required for javadsl JUnit tests
crossPaths := false, // https://github.com/sbt/junit-interface/issues/35
publishArtifact := false,
libraryDependencies ++= Seq(
akkaStreamsProvided,
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "test",
akkaStreamsTestkit,
"junit" % "junit" % "4.13.1" % "test",
"com.novocode" % "junit-interface" % "0.11" % "test",
scalaTest
)
)
.dependsOn(core, jwt)