Skip to content

Commit 326f006

Browse files
committed
try to merge builds
1 parent 7e3d0c6 commit 326f006

File tree

6 files changed

+99
-109
lines changed

6 files changed

+99
-109
lines changed

build.sbt

+97-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings
22
import com.softwaremill.Publish.ossPublishSettings
33

4-
val scala2_12 = "2.12.15"
5-
val scala2_13 = "2.13.8"
4+
val scala2_12 = "2.12.18"
5+
val scala2_13 = "2.13.11"
6+
val scala3 = "3.3.0"
67
val scala2 = List(scala2_12, scala2_13)
8+
val scala2And3 = List(scala2_12, scala2_13, scala3)
79

810
lazy val commonSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq(
911
organization := "com.softwaremill.akka-http-session",
@@ -16,13 +18,22 @@ val json4sVersion = "4.0.4"
1618
val akkaStreamsProvided = "com.typesafe.akka" %% "akka-stream" % akkaStreamsVersion % "provided"
1719
val akkaStreamsTestkit = "com.typesafe.akka" %% "akka-stream-testkit" % akkaStreamsVersion % "test"
1820

19-
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.11" % "test"
21+
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.16" % "test"
2022

21-
lazy val rootProject = (project in file("."))
23+
lazy val akkaRootProject = (project in file("."))
2224
.settings(commonSettings: _*)
2325
.settings(publish / skip := true, name := "akka-http-session", scalaVersion := scala2_13)
2426
.aggregate(core.projectRefs ++ jwt.projectRefs ++ example.projectRefs ++ javaTests.projectRefs: _*)
2527

28+
lazy val pekkoRootProject = (project in file("."))
29+
.settings(pekkoCommonSettings: _*)
30+
.settings(publish / skip := true, name := "pekko-http-session", scalaVersion := scala2_13)
31+
.aggregate(pekkoCore.projectRefs ++ pekkoJwt.projectRefs ++ pekkoExample.projectRefs ++ pekkoJavaTests.projectRefs: _*)
32+
33+
lazy val rootProject = (project in file("."))
34+
.settings(publish / skip := true, name := "akka-http-session-root", scalaVersion := scala2_13)
35+
.aggregate(akkaRootProject, pekkoRootProject)
36+
2637
lazy val core = (projectMatrix in file("core"))
2738
.settings(commonSettings: _*)
2839
.settings(
@@ -88,3 +99,85 @@ lazy val javaTests = (projectMatrix in file("javaTests"))
8899
)
89100
.jvmPlatform(scalaVersions = scala2)
90101
.dependsOn(core, jwt)
102+
103+
// Pekko build
104+
105+
lazy val pekkoCommonSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq(
106+
organization := "com.softwaremill.pekko-http-session",
107+
versionScheme := Some("early-semver")
108+
)
109+
110+
val pekkoHttpVersion = "1.0.0"
111+
val pekkoStreamsVersion = "1.0.1"
112+
113+
val pekkoStreamsProvided = "org.apache.pekko" %% "pekko-stream" % pekkoStreamsVersion % "provided"
114+
val pekkoStreamsTestkit = "org.apache.pekko" %% "pekko-stream-testkit" % pekkoStreamsVersion % "test"
115+
val scalaJava8CompatVersion = "1.0.2"
116+
117+
lazy val pekkoCore = (projectMatrix in file("pekko-http-session/core"))
118+
.settings(pekkoCommonSettings: _*)
119+
.settings(
120+
name := "core",
121+
libraryDependencies ++= Seq(
122+
"org.apache.pekko" %% "pekko-http" % pekkoHttpVersion,
123+
"org.scala-lang.modules" %% "scala-java8-compat" % scalaJava8CompatVersion,
124+
pekkoStreamsProvided,
125+
"org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpVersion % "test",
126+
pekkoStreamsTestkit,
127+
"org.scalacheck" %% "scalacheck" % "1.15.4" % "test",
128+
scalaTest
129+
)
130+
)
131+
.jvmPlatform(scalaVersions = scala2And3)
132+
133+
lazy val pekkoJwt = (projectMatrix in file("pekko-http-session/jwt"))
134+
.settings(pekkoCommonSettings: _*)
135+
.settings(
136+
name := "jwt",
137+
libraryDependencies ++= Seq(
138+
"org.json4s" %% "json4s-jackson" % json4sVersion,
139+
"org.json4s" %% "json4s-ast" % json4sVersion,
140+
"org.json4s" %% "json4s-core" % json4sVersion,
141+
pekkoStreamsProvided,
142+
scalaTest
143+
),
144+
// generating docs for 2.13 causes an error: "not found: type DefaultFormats$"
145+
Compile / doc / sources := Seq.empty
146+
)
147+
.jvmPlatform(scalaVersions = scala2And3)
148+
.dependsOn(pekkoCore)
149+
150+
lazy val pekkoExample = (projectMatrix in file("pekko-http-session/example"))
151+
.settings(pekkoCommonSettings: _*)
152+
.settings(
153+
publishArtifact := false,
154+
libraryDependencies ++= Seq(
155+
pekkoStreamsProvided,
156+
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.4",
157+
"ch.qos.logback" % "logback-classic" % "1.2.12",
158+
"org.json4s" %% "json4s-ext" % json4sVersion
159+
)
160+
)
161+
.jvmPlatform(scalaVersions = scala2And3)
162+
.dependsOn(pekkoCore, pekkoJwt)
163+
164+
lazy val pekkoJavaTests = (projectMatrix in file("pekko-http-session/javaTests"))
165+
.settings(pekkoCommonSettings: _*)
166+
.settings(
167+
name := "javaTests",
168+
Test / testOptions := Seq(Tests.Argument(TestFrameworks.JUnit, "-a")), // required for javadsl JUnit tests
169+
crossPaths := false, // https://github.com/sbt/junit-interface/issues/35
170+
publishArtifact := false,
171+
libraryDependencies ++= Seq(
172+
pekkoStreamsProvided,
173+
"org.apache.pekko" %% "pekko-http" % pekkoHttpVersion,
174+
"org.scala-lang.modules" %% "scala-java8-compat" % scalaJava8CompatVersion,
175+
"org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpVersion % "test",
176+
pekkoStreamsTestkit,
177+
"junit" % "junit" % "4.13.2" % "test",
178+
"com.github.sbt" % "junit-interface" % "0.13.3" % "test",
179+
scalaTest
180+
)
181+
)
182+
.jvmPlatform(scalaVersions = scala2And3)
183+
.dependsOn(pekkoCore, pekkoJwt)

pekko-http-session/build.sbt

-94
This file was deleted.

pekko-http-session/project/build.properties

-1
This file was deleted.

pekko-http-session/project/plugins.sbt

-8
This file was deleted.

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.6.1
1+
sbt.version=1.9.3

project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % s
33
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" % sbtSoftwareMillVersion)
44
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-browser-test-js" % sbtSoftwareMillVersion)
55

6-
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "2.4.16")
6+
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.1.3")
77

88
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.0")

0 commit comments

Comments
 (0)