diff --git a/build.sbt b/build.sbt index 5e26cba..1935038 100644 --- a/build.sbt +++ b/build.sbt @@ -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", @@ -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( @@ -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) diff --git a/pekko-http-session/build.sbt b/pekko-http-session/build.sbt deleted file mode 100644 index 78685a8..0000000 --- a/pekko-http-session/build.sbt +++ /dev/null @@ -1,94 +0,0 @@ -import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings -import com.softwaremill.Publish.ossPublishSettings - -val scala2_12 = "2.12.18" -val scala2_13 = "2.13.11" -val scala3 = "3.3.0" -val scalaVersions = List(scala2_12, scala2_13, scala3) - -lazy val commonSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq( - organization := "com.softwaremill.pekko-http-session", - versionScheme := Some("early-semver") -) - -val pekkoHttpVersion = "1.0.0" -val pekkoStreamsVersion = "1.0.1" -val scalaJava8CompatVersion = "1.0.2" -val json4sVersion = "4.0.4" -val pekkoStreamsProvided = "org.apache.pekko" %% "pekko-stream" % pekkoStreamsVersion % "provided" -val pekkoStreamsTestkit = "org.apache.pekko" %% "pekko-stream-testkit" % pekkoStreamsVersion % "test" - -val scalaTest = "org.scalatest" %% "scalatest" % "3.2.16" % "test" - -lazy val rootProject = (project in file(".")) - .settings(commonSettings: _*) - .settings(publish / skip := true, name := "pekko-http-session", scalaVersion := scala2_13) - .aggregate(core.projectRefs ++ jwt.projectRefs ++ example.projectRefs ++ javaTests.projectRefs: _*) - -lazy val core = (projectMatrix in file("core")) - .settings(commonSettings: _*) - .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 = scalaVersions) - -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, - pekkoStreamsProvided, - scalaTest - ), - // generating docs for 2.13 causes an error: "not found: type DefaultFormats$" - Compile / doc / sources := Seq.empty - ) - .jvmPlatform(scalaVersions = scalaVersions) - .dependsOn(core) - -lazy val example = (projectMatrix in file("example")) - .settings(commonSettings: _*) - .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 = scalaVersions) - .dependsOn(core, 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( - 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 = scalaVersions) - .dependsOn(core, jwt) diff --git a/pekko-http-session/project/build.properties b/pekko-http-session/project/build.properties deleted file mode 100644 index e2e1cd8..0000000 --- a/pekko-http-session/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.9.3 \ No newline at end of file diff --git a/pekko-http-session/project/plugins.sbt b/pekko-http-session/project/plugins.sbt deleted file mode 100644 index 832676c..0000000 --- a/pekko-http-session/project/plugins.sbt +++ /dev/null @@ -1,8 +0,0 @@ -val sbtSoftwareMillVersion = "2.0.9" -addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % sbtSoftwareMillVersion) -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" % "3.1.3") - -addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.0") diff --git a/project/build.properties b/project/build.properties index 203e3dc..e2e1cd8 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.1 \ No newline at end of file +sbt.version=1.9.3 \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index 249e415..832676c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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")