forked from softwaremill/akka-http-session
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
107 lines (97 loc) · 3.87 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
import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings
import com.softwaremill.Publish.ossPublishSettings
val scala2_12 = "2.12.15"
val scala2_13 = "2.13.8"
val scala2 = List(scala2_12, scala2_13)
lazy val commonSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq(
organization := "com.softwaremill.akka-http-session",
versionScheme := Some("early-semver")
)
val akkaHttpVersion = "10.2.7"
val akkaVersion = "2.6.18"
val json4sVersion = "4.0.4"
val akkaStreams = "com.typesafe.akka" %% "akka-stream" % akkaVersion
val akkaStreamsTestkit = "com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % "test"
val tapirVersion = "1.3.0"
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.11" % "test"
lazy val rootProject = (project in file("."))
.settings(commonSettings: _*)
.settings(publish / skip := true, name := "akka-http-session", scalaVersion := scala2_13)
.aggregate(core.projectRefs ++ jwt.projectRefs ++ example.projectRefs ++ javaTests.projectRefs ++ tapir.projectRefs: _*)
lazy val core = (projectMatrix in file("core"))
.settings(commonSettings: _*)
.settings(
name := "core",
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
akkaStreams % "provided",
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "test",
akkaStreamsTestkit,
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.4",
"org.scalacheck" %% "scalacheck" % "1.15.4" % "test",
scalaTest
)
)
.jvmPlatform(scalaVersions = scala2)
lazy val jwt = (projectMatrix in file("jwt"))
.settings(commonSettings: _*)
.settings(
name := "jwt",
libraryDependencies ++= Seq(
"org.json4s" %% "json4s-jackson" % json4sVersion,
"org.json4s" %% "json4s-ast" % json4sVersion,
"org.json4s" %% "json4s-core" % json4sVersion,
akkaStreams % "provided",
scalaTest
),
// generating docs for 2.13 causes an error: "not found: type DefaultFormats$"
Compile / doc / sources := Seq.empty
)
.jvmPlatform(scalaVersions = scala2)
.dependsOn(core)
lazy val example = (projectMatrix in file("example"))
.settings(commonSettings: _*)
.settings(
publishArtifact := false,
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
akkaStreams,
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.4",
"ch.qos.logback" % "logback-classic" % "1.2.10",
"org.json4s" %% "json4s-ext" % json4sVersion,
"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % tapirVersion
)
)
.jvmPlatform(scalaVersions = scala2)
.dependsOn(tapir, jwt)
lazy val javaTests = (projectMatrix in file("javaTests"))
.settings(commonSettings: _*)
.settings(
name := "javaTests",
Test / testOptions := 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(
akkaStreams % "provided",
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "test",
akkaStreamsTestkit,
"junit" % "junit" % "4.13.2" % "test",
"com.github.sbt" % "junit-interface" % "0.13.3" % "test",
scalaTest
)
)
.jvmPlatform(scalaVersions = scala2)
.dependsOn(core, jwt)
lazy val tapir = (projectMatrix in file("tapir"))
.settings(commonSettings: _*)
.settings(
name := "tapir",
libraryDependencies ++= Seq(
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.4",
"com.softwaremill.sttp.tapir" %% "tapir-core" % tapirVersion,
"com.softwaremill.sttp.tapir" %% "tapir-akka-http-server" % tapirVersion excludeAll ExclusionRule(organization = "com.typesafe.akka")
)
)
.jvmPlatform(scalaVersions = scala2)
.dependsOn(core % "compile->compile;test->test")