Skip to content

Commit 51f3485

Browse files
committed
Add capability for Pekko Streams
1 parent 5c3e00e commit 51f3485

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

build.sbt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ val commonNativeSettings = commonSettings ++ Seq(
7575
)
7676

7777
lazy val allProjectRefs =
78-
core.projectRefs ++ ws.projectRefs ++ akka.projectRefs ++ armeria.projectRefs ++ fs2ce2.projectRefs ++ fs2.projectRefs ++ monix.projectRefs ++ zio1.projectRefs ++ zio.projectRefs ++ vertx.projectRefs
78+
core.projectRefs ++ ws.projectRefs ++ akka.projectRefs ++ pekko.projectRefs ++ armeria.projectRefs ++ fs2ce2.projectRefs ++ fs2.projectRefs ++ monix.projectRefs ++ zio1.projectRefs ++ zio.projectRefs ++ vertx.projectRefs
7979

8080
lazy val projectAggregates: Seq[ProjectReference] = if (sys.env.isDefinedAt("STTP_NATIVE")) {
8181
println("[info] STTP_NATIVE defined, including sttp-native in the aggregate projects")
@@ -146,6 +146,20 @@ lazy val akka = (projectMatrix in file("akka"))
146146
)
147147
.dependsOn(core)
148148

149+
ThisBuild / resolvers += "Apache Snapshots".at("https://repository.apache.org/content/repositories/snapshots/") // Remove once Pekko makes a proper release
150+
151+
lazy val pekko = (projectMatrix in file("pekko"))
152+
.settings(
153+
name := "pekko"
154+
)
155+
.jvmPlatform(
156+
scalaVersions = scala2alive ++ scala3,
157+
settings = commonJvmSettings ++ Seq(
158+
libraryDependencies += "org.apache.pekko" %% "pekko-stream" % "0.0.0+26621-44d03df6-SNAPSHOT" % "provided"
159+
)
160+
)
161+
.dependsOn(core)
162+
149163
lazy val armeria = (projectMatrix in file("armeria"))
150164
.settings(
151165
name := "armeria"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package sttp.capabilities.pekko
2+
3+
import org.apache.pekko
4+
import pekko.stream.scaladsl.{Flow, Source}
5+
import pekko.util.ByteString
6+
import sttp.capabilities.Streams
7+
8+
trait PekkoStreams extends Streams[PekkoStreams] {
9+
override type BinaryStream = Source[ByteString, Any]
10+
override type Pipe[A, B] = Flow[A, B, Any]
11+
}
12+
object PekkoStreams extends PekkoStreams

0 commit comments

Comments
 (0)