Skip to content

Commit bf1b59b

Browse files
authored
Merge pull request #276 from mdedetrich/add-stream-capability-for-pekko
Add capability for Pekko Streams
2 parents a973886 + bd53ffd commit bf1b59b

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

build.sbt

Lines changed: 13 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,18 @@ lazy val akka = (projectMatrix in file("akka"))
146146
)
147147
.dependsOn(core)
148148

149+
lazy val pekko = (projectMatrix in file("pekko"))
150+
.settings(
151+
name := "pekko"
152+
)
153+
.jvmPlatform(
154+
scalaVersions = scala2alive ++ scala3,
155+
settings = commonJvmSettings ++ Seq(
156+
libraryDependencies += "org.apache.pekko" %% "pekko-stream" % "1.0.0" % "provided"
157+
)
158+
)
159+
.dependsOn(core)
160+
149161
lazy val armeria = (projectMatrix in file("armeria"))
150162
.settings(
151163
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)