Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
SCALA_VERSION: [2.12, 2.13, 3]
SCALA_VERSION: [2.13, 3]
JDK: [17, 21]
PEKKO_VERSION: ['default']
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
strategy:
fail-fast: false
matrix:
SCALA_VERSION: [2.12, 2.13, 3.3]
SCALA_VERSION: [2.13, 3.3]
JDK: [17]
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ Copyright 2014 Twitter, Inc.

pekko-http-core contains code from scala-collection-compat in the `org.apache.pekko.http.ccompat` package
distributed under the Apache 2.0 license.
- http-core/src/main/scala-2.13-/org/apache/pekko/http/ccompat/package.scala
- http-core/src/main/scala-2.13-/org/apache/pekko/http/ccompat/CompatImpl.scala
- http-core/src/main/scala-2.13/org/apache/pekko/http/ccompat/package.scala
- http-core/src/main/scala-2.13/org/apache/pekko/http/ccompat/CompatImpl.scala

Copyright EPFL and Lightbend, Inc.

Expand Down
46 changes: 2 additions & 44 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -88,40 +88,17 @@ lazy val root = Project(
Compile / headerCreate / unmanagedSources := (baseDirectory.value / "project").**("*.scala").get)
.aggregate(aggregatedProjects: _*)

/**
* Adds a `src/.../scala-2.13+` source directory for Scala 2.13 and newer
* and a `src/.../scala-2.13-` source directory for Scala version older than 2.13
*/
def add213CrossDirs(config: Configuration): Seq[Setting[_]] = Seq(
config / unmanagedSourceDirectories += {
val sourceDir = (config / sourceDirectory).value
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((e, n)) if e > 2 || (e == 2 && n >= 13) => sourceDir / "scala-2.13+"
case _ => sourceDir / "scala-2.13-"
}
})

val commonSettings =
add213CrossDirs(Compile) ++
add213CrossDirs(Test)

val scalaMacroSupport = Seq(
scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n >= 13 =>
case Some((2, n)) =>
Seq("-Ymacro-annotations")
case _ =>
Seq.empty
}
},
libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n < 13 =>
Seq(compilerPlugin(("org.scalamacros" % "paradise" % "2.1.1").cross(CrossVersion.full)))
case _ => Seq.empty
}))
})

lazy val parsing = project("parsing")
.settings(commonSettings)
.settings(AutomaticModuleName.settings("pekko.http.parsing"))
.addPekkoModuleDependency("pekko-actor", "provided", PekkoCoreDependency.default)
.settings(Dependencies.parsing)
Expand All @@ -132,7 +109,6 @@ lazy val parsing = project("parsing")
.disablePlugins(MimaPlugin)

lazy val httpCore = project("http-core")
.settings(commonSettings)
.settings(AutomaticModuleName.settings("pekko.http.core"))
.settings(AddMetaInfLicenseFiles.httpCoreSettings)
.dependsOn(parsing /*, httpScalafixRules % ScalafixConfig*/ )
Expand All @@ -146,28 +122,20 @@ lazy val httpCore = project("http-core")
.settings(scalaMacroSupport)
.enablePlugins(BootstrapGenjavadoc)
.enablePlugins(ReproducibleBuildsPlugin)
.enablePlugins(Pre213Preprocessor).settings(
Pre213Preprocessor.pre213Files := Seq(
"headers.scala", "HttpMessage.scala", "LanguageRange.scala", "CacheDirective.scala", "LinkValue.scala"))
.disablePlugins(ScalafixPlugin)

lazy val http = project("http")
.settings(commonSettings)
.settings(AutomaticModuleName.settings("pekko.http"))
.dependsOn(httpCore)
.addPekkoModuleDependency("pekko-stream", "provided", PekkoCoreDependency.default)
.settings(Dependencies.http)
.settings(
Compile / scalacOptions += "-language:_")
.settings(scalaMacroSupport)
.enablePlugins(Pre213Preprocessor).settings(
Pre213Preprocessor.pre213Files := Seq(
"scaladsl/server/directives/FormFieldDirectives.scala", "scaladsl/server/directives/RespondWithDirectives.scala"))
.enablePlugins(BootstrapGenjavadoc, BoilerplatePlugin)
.enablePlugins(ReproducibleBuildsPlugin)

lazy val http2Tests = project("http2-tests")
.settings(commonSettings)
.settings(AutomaticModuleName.settings("pekko.http.http2"))
.dependsOn(httpCore, httpTestkit % "test", httpCore % "test->test")
.addPekkoModuleDependency("pekko-stream", "provided", PekkoCoreDependency.default)
Expand Down Expand Up @@ -209,7 +177,6 @@ lazy val http2Tests = project("http2-tests")
.disablePlugins(MimaPlugin) // experimental module still

lazy val httpTestkit = project("http-testkit")
.settings(commonSettings)
.settings(AutomaticModuleName.settings("pekko.http.testkit"))
.dependsOn(http)
.addPekkoModuleDependency("pekko-stream-testkit", "provided", PekkoCoreDependency.default)
Expand All @@ -225,7 +192,6 @@ lazy val httpTestkit = project("http-testkit")
.disablePlugins(MimaPlugin) // testkit, no bin compat guaranteed

lazy val httpTestkitMunit = project("http-testkit-munit")
.settings(commonSettings)
.settings(AutomaticModuleName.settings("pekko.http.testkit.munit"))
.dependsOn(http, httpTestkit)
.addPekkoModuleDependency("pekko-stream-testkit", "provided", PekkoCoreDependency.default)
Expand All @@ -234,7 +200,6 @@ lazy val httpTestkitMunit = project("http-testkit-munit")
.disablePlugins(MimaPlugin) // testkit, no bin compat guaranteed

lazy val httpTests = project("http-tests")
.settings(commonSettings)
.settings(Dependencies.httpTests)
.dependsOn(httpSprayJson, httpXml, httpJackson,
httpTestkit % "test", httpCore % "test->test",
Expand All @@ -261,15 +226,13 @@ lazy val httpTests = project("http-tests")
})

lazy val httpJmhBench = project("http-bench-jmh")
.settings(commonSettings)
.dependsOn(http, httpCors, http2Tests % "compile->compile,test")
.addPekkoModuleDependency("pekko-stream", "", PekkoCoreDependency.default)
.enablePlugins(JmhPlugin)
.enablePlugins(NoPublish) // don't release benchs
.disablePlugins(MimaPlugin)

lazy val httpMarshallersScala = project("http-marshallers-scala")
.settings(commonSettings)
.enablePlugins(NoPublish /*, AggregatePRValidation*/ )
.disablePlugins(MimaPlugin)
.aggregate(httpSprayJson, httpXml)
Expand All @@ -287,7 +250,6 @@ lazy val httpSprayJson =
.settings(Dependencies.httpSprayJson)

lazy val httpMarshallersJava = project("http-marshallers-java")
.settings(commonSettings)
.enablePlugins(NoPublish /*, AggregatePRValidation*/ )
.disablePlugins(MimaPlugin)
.aggregate(httpJackson)
Expand All @@ -304,7 +266,6 @@ lazy val httpJackson =
lazy val httpCaching = project("http-caching")
.settings(
name := "pekko-http-caching")
.settings(commonSettings)
.settings(AutomaticModuleName.settings("pekko.http.caching"))
.addPekkoModuleDependency("pekko-stream", "provided", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-stream-testkit", "provided", PekkoCoreDependency.default)
Expand All @@ -315,7 +276,6 @@ lazy val httpCaching = project("http-caching")
lazy val httpCors = project("http-cors")
.settings(
name := "pekko-http-cors")
.settings(commonSettings)
.settings(AutomaticModuleName.settings("pekko.http.cors"))
.settings(AddMetaInfLicenseFiles.httpCorsSettings)
.addPekkoModuleDependency("pekko-stream", "provided", PekkoCoreDependency.default)
Expand All @@ -335,7 +295,6 @@ def httpMarshallersScalaSubproject(moduleName: String) =
.dependsOn(http)
.settings(
name := s"pekko-http-$moduleName")
.settings(commonSettings)
.enablePlugins(BootstrapGenjavadoc)
.enablePlugins(ReproducibleBuildsPlugin)

Expand All @@ -346,7 +305,6 @@ def httpMarshallersJavaSubproject(moduleName: String) =
.settings(
name := s"pekko-http-$moduleName")
.dependsOn(http)
.settings(commonSettings)
.enablePlugins(BootstrapGenjavadoc)
.enablePlugins(ReproducibleBuildsPlugin)

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading