Skip to content

Commit

Permalink
try to merge builds
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Aug 23, 2023
1 parent 7e3d0c6 commit 326f006
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 109 deletions.
101 changes: 97 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings
import com.softwaremill.Publish.ossPublishSettings

val scala2_12 = "2.12.15"
val scala2_13 = "2.13.8"
val scala2_12 = "2.12.18"
val scala2_13 = "2.13.11"
val scala3 = "3.3.0"
val scala2 = List(scala2_12, scala2_13)
val scala2And3 = List(scala2_12, scala2_13, scala3)

lazy val commonSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq(
organization := "com.softwaremill.akka-http-session",
Expand All @@ -16,13 +18,22 @@ val json4sVersion = "4.0.4"
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.11" % "test"
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.16" % "test"

lazy val rootProject = (project in file("."))
lazy val akkaRootProject = (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: _*)

lazy val pekkoRootProject = (project in file("."))
.settings(pekkoCommonSettings: _*)
.settings(publish / skip := true, name := "pekko-http-session", scalaVersion := scala2_13)
.aggregate(pekkoCore.projectRefs ++ pekkoJwt.projectRefs ++ pekkoExample.projectRefs ++ pekkoJavaTests.projectRefs: _*)

lazy val rootProject = (project in file("."))
.settings(publish / skip := true, name := "akka-http-session-root", scalaVersion := scala2_13)
.aggregate(akkaRootProject, pekkoRootProject)

lazy val core = (projectMatrix in file("core"))
.settings(commonSettings: _*)
.settings(
Expand Down Expand Up @@ -88,3 +99,85 @@ lazy val javaTests = (projectMatrix in file("javaTests"))
)
.jvmPlatform(scalaVersions = scala2)
.dependsOn(core, jwt)

// Pekko build

lazy val pekkoCommonSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq(
organization := "com.softwaremill.pekko-http-session",
versionScheme := Some("early-semver")
)

val pekkoHttpVersion = "1.0.0"
val pekkoStreamsVersion = "1.0.1"

val pekkoStreamsProvided = "org.apache.pekko" %% "pekko-stream" % pekkoStreamsVersion % "provided"
val pekkoStreamsTestkit = "org.apache.pekko" %% "pekko-stream-testkit" % pekkoStreamsVersion % "test"
val scalaJava8CompatVersion = "1.0.2"

lazy val pekkoCore = (projectMatrix in file("pekko-http-session/core"))
.settings(pekkoCommonSettings: _*)
.settings(
name := "core",
libraryDependencies ++= Seq(
"org.apache.pekko" %% "pekko-http" % pekkoHttpVersion,
"org.scala-lang.modules" %% "scala-java8-compat" % scalaJava8CompatVersion,
pekkoStreamsProvided,
"org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpVersion % "test",
pekkoStreamsTestkit,
"org.scalacheck" %% "scalacheck" % "1.15.4" % "test",
scalaTest
)
)
.jvmPlatform(scalaVersions = scala2And3)

lazy val pekkoJwt = (projectMatrix in file("pekko-http-session/jwt"))
.settings(pekkoCommonSettings: _*)
.settings(
name := "jwt",
libraryDependencies ++= Seq(
"org.json4s" %% "json4s-jackson" % json4sVersion,
"org.json4s" %% "json4s-ast" % json4sVersion,
"org.json4s" %% "json4s-core" % json4sVersion,
pekkoStreamsProvided,
scalaTest
),
// generating docs for 2.13 causes an error: "not found: type DefaultFormats$"
Compile / doc / sources := Seq.empty
)
.jvmPlatform(scalaVersions = scala2And3)
.dependsOn(pekkoCore)

lazy val pekkoExample = (projectMatrix in file("pekko-http-session/example"))
.settings(pekkoCommonSettings: _*)
.settings(
publishArtifact := false,
libraryDependencies ++= Seq(
pekkoStreamsProvided,
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.4",
"ch.qos.logback" % "logback-classic" % "1.2.12",
"org.json4s" %% "json4s-ext" % json4sVersion
)
)
.jvmPlatform(scalaVersions = scala2And3)
.dependsOn(pekkoCore, pekkoJwt)

lazy val pekkoJavaTests = (projectMatrix in file("pekko-http-session/javaTests"))
.settings(pekkoCommonSettings: _*)
.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(
pekkoStreamsProvided,
"org.apache.pekko" %% "pekko-http" % pekkoHttpVersion,
"org.scala-lang.modules" %% "scala-java8-compat" % scalaJava8CompatVersion,
"org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpVersion % "test",
pekkoStreamsTestkit,
"junit" % "junit" % "4.13.2" % "test",
"com.github.sbt" % "junit-interface" % "0.13.3" % "test",
scalaTest
)
)
.jvmPlatform(scalaVersions = scala2And3)
.dependsOn(pekkoCore, pekkoJwt)
94 changes: 0 additions & 94 deletions pekko-http-session/build.sbt

This file was deleted.

1 change: 0 additions & 1 deletion pekko-http-session/project/build.properties

This file was deleted.

8 changes: 0 additions & 8 deletions pekko-http-session/project/plugins.sbt

This file was deleted.

2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.6.1
sbt.version=1.9.3
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % s
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-browser-test-js" % sbtSoftwareMillVersion)

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

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

0 comments on commit 326f006

Please sign in to comment.