This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-pekko-grpc-quickstart-scala.g8.git
The following commit(s) were added to refs/heads/main by this push:
new b56375c change to pekko
b56375c is described below
commit b56375c4bbcfa82d7cea46d4ef7177c0096317ca
Author: PJ Fanning <[email protected]>
AuthorDate: Tue Dec 5 17:33:49 2023 +0100
change to pekko
---
.github/workflows/ci.yml | 20 +-----
DISCLAIMER | 10 +++
README.md | 22 ++++---
build.sbt | 7 +-
docs/build.sbt | 6 +-
docs/src/main/paradox/index.md | 46 ++++---------
docs/src/main/paradox/streaming.md | 4 +-
docs/src/main/paradox/testing.md | 2 +-
project/build.properties | 2 +-
project/paradox.sbt | 11 +++-
project/project-info.conf | 3 +
src/main/g8/build.gradle | 24 +++----
src/main/g8/build.sbt | 26 ++++----
src/main/g8/default.properties | 8 +--
src/main/g8/pom.xml | 75 +++++++++-------------
src/main/g8/project/plugins.sbt | 4 +-
src/main/g8/src/main/resources/application.conf | 2 +-
src/main/g8/src/main/resources/logback.xml | 4 +-
.../com/example/helloworld/GreeterClient.scala | 16 ++---
.../com/example/helloworld/GreeterServer.scala | 21 +++---
.../example/helloworld/GreeterServiceImpl.scala | 15 +++--
.../helloworld/GreeterServiceImplSpec.scala | 5 +-
.../scala/com/example/helloworld/GreeterSpec.scala | 11 ++--
23 files changed, 152 insertions(+), 192 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index faefcea..56945a1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -11,12 +11,12 @@ on:
jobs:
check:
name: Build and test
- if: github.repository == 'akka/akka-grpc-quickstart-scala.g8'
+ if: github.repository == 'apache/incubator-pekko-grpc-quickstart-scala.g8'
runs-on: ubuntu-20.04
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Set up JDK 17
uses: coursier/[email protected]
@@ -36,19 +36,3 @@ jobs:
- name: Gradle
run: |-
sbt new file://$PWD --name=hello-world-grpc --force && pushd
hello-world-grpc && ./gradlew --console=plain build -i --no-daemon
-
- - name: Email on failure
- if: ${{ failure() }}
- uses: dawidd6/action-send-mail@v3
- with:
- server_address: smtp.gmail.com
- server_port: 465
- secure: true
- username: ${{ secrets.MAIL_USERNAME }}
- password: ${{ secrets.MAIL_PASSWORD }}
- subject: "Failed: ${{ github.workflow }} / ${{ github.job }}"
- to: [email protected]
- from: Akka CI (GHActions)
- body: |
- Job ${{ github.job }} in workflow ${{ github.workflow }} of
${{github.repository}} failed!
-
https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
diff --git a/DISCLAIMER b/DISCLAIMER
new file mode 100644
index 0000000..6a31e0f
--- /dev/null
+++ b/DISCLAIMER
@@ -0,0 +1,10 @@
+Apache Pekko (incubating) is an effort undergoing incubation at the Apache
+Software Foundation (ASF), sponsored by the Apache Incubator PMC.
+
+Incubation is required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness
+or stability of the code, it does indicate that the project has yet to be
+fully endorsed by the ASF.
diff --git a/README.md b/README.md
index bfeb09d..3f813b6 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,29 @@
-# Akka gRPC Quickstart with Scala
+# Apache Pekko gRPC Quickstart with Scala
## Quickstart guide
-This example is described in the [Akka gRPC Quickstart with Scala
guide](https://developer.lightbend.com/guides/akka-grpc-quickstart-scala/)
-
-The Hello World example illustrates Akka gRPC basics. Within 30 minutes, you
should be able to download and run the example and use this guide to understand
how the example is constructed.
+The Hello World example illustrates Pekko gRPC basics. Within 30 minutes, you
should be able to download and run the example and use this guide to understand
how the example is constructed.
## Giter8 template
-It can also be used as a [Giter8][g8] template for Akka with Scala.
+It can also be used as a [Giter8][g8] template for Pekko with Scala.
Prerequisites:
-- JDK 17
-- [sbt][sbt] 1.9.x or higher ([download here][sbt_download])
+- JDK 8
+- [sbt][sbt] 1.4.x or higher ([download here][sbt_download])
Open a console and run the following command to apply this template:
```
-sbt new akka/akka-grpc-quickstart-scala.g8
+sbt new apache/incubator-pekko-grpc-quickstart-scala.g8
+ ```
+
+You can also install [Giter8](http://www.foundweekends.org/giter8/setup.html)
and install using:
+ ```
+g8 apache/incubabor-pekko-grpc-quickstart-scala.g8
```
-This template will prompt for the name of the project. Press `Enter` if the
default values suit you.
-Once inside the project folder, follow the [Akka gRPC Quickstart with Scala
guide](https://developer.lightbend.com/guides/akka-grpc-quickstart-scala/) run
both the server and the client and also to learn more about how this Hello
World project works.
+This template will prompt for the name of the project. Press `Enter` if the
default values suit you.
## Template license
diff --git a/build.sbt b/build.sbt
index 856c28d..5f7c08a 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,10 +1,12 @@
+import org.apache.pekko.PekkoParadoxPlugin.autoImport._
+
// This build is for this Giter8 template.
// To test the template run `g8` or `g8Test` from the sbt session.
// See http://www.foundweekends.org/giter8/testing.html#Using+the+Giter8Plugin
for more details.
lazy val root = project
.in(file("."))
.settings(
- name := "akka-grpc-scala-seed",
+ name := "pekko-grpc-scala-seed",
Test / test := {
val _ = (Test / g8Test).toTask("").value
},
@@ -18,4 +20,5 @@ lazy val root = project
// open docs/target/paradox/site/main/index.html
lazy val docs = project
.in(file("docs"))
- .enablePlugins(ParadoxPlugin)
+ .enablePlugins(ParadoxPlugin, PekkoParadoxPlugin)
+ .settings(pekkoParadoxGithub :=
Some("https://github.com/apache/incubator-pekko-grpc-quickstart-scala.g8"))
diff --git a/docs/build.sbt b/docs/build.sbt
index b9effc7..89d258d 100644
--- a/docs/build.sbt
+++ b/docs/build.sbt
@@ -1,8 +1,5 @@
-// Uses the out of the box generic theme.
-paradoxTheme := Some(builtinParadoxTheme("generic"))
-
// Scala version to use inside sbt
-scalaVersion := "2.12.15"
+scalaVersion := "2.12.18"
Compile / paradoxProperties ++= Map(
"snip.g8root.base_dir" -> "../../../../src/main/g8",
@@ -10,7 +7,6 @@ Compile / paradoxProperties ++= Map(
"snip.g8srctest.base_dir" -> "../../../../src/main/g8/src/test/"
)
-
paradoxGroups := Map(
"Buildtool" -> Seq("sbt", "Gradle", "Maven")
)
diff --git a/docs/src/main/paradox/index.md b/docs/src/main/paradox/index.md
index 99d33be..d6aee06 100644
--- a/docs/src/main/paradox/index.md
+++ b/docs/src/main/paradox/index.md
@@ -1,36 +1,12 @@
-# Akka gRPC Quickstart with Scala
+# Apache Pekko gRPC Quickstart with Scala
-Akka gRPC is a toolkit for building streaming gRPC servers and clients on top
of Akka Streams. This guide will get you started building gRPC based systems
with Scala. If you prefer to use Akka gRPC with Java, switch to the [Akka gRPC
Quickstart with Java
guide](https://developer.lightbend.com/guides/akka-grpc-quickstart-java/).
+Pekko gRPC is a toolkit for building streaming gRPC servers and clients on top
of Pekko Streams. This guide will get you started building gRPC based systems
with Scala. If you prefer to use Pekko gRPC with Java, switch to the [Pekko
gRPC Quickstart with Java
guide](https://github.com/apache/incubator-pekko-grpc-quickstart-java.g8).
-After trying this example the [Akka gRPC
documentation](https://doc.akka.io/docs/akka-grpc/) is a good next step to
continue learning more about Akka gRPC.
+After trying this example the [Pekko gRPC
documentation](https://pekko.apache.org/docs/pekko-grpc/) is a good next step
to continue learning more about Pekko gRPC.
## Downloading the example
-The Hello World example for Scala is a zipped project that includes a
distribution of sbt, Maven and Gradle. You can choose any of these build tools.
You can run it on Linux, MacOS, or Windows. The only prerequisite is Java 8 or
later.
-
-Download and unzip the example:
-
-1. Download the [zip
file](https://example.lightbend.com/v1/download/akka-grpc-quickstart-scala?name=akka-grpc-quickstart-scala).
-1. Extract the zip file to a convenient location:
- - On Linux and OSX systems, open a terminal and use the command `unzip
akka-grpc-quickstart-scala.zip`. Note: On OSX, if you unzip using Archiver, you
also have to make the build files executable:
-
-sbt
-: ```
- $ chmod u+x ./sbt
- $ chmod u+x ./sbt-dist/bin/sbt
- ```
-
-Maven
-: ```
- Local installation of mvn is required.
- ```
-
-Gradle
-: ```
- $ chmod u+x ./gradlew
- ```
-
- - On Windows, use a tool such as File Explorer to extract the project.
+Follow the instructions in
https://github.com/apache/incubator-pekko-grpc-quickstart-scala.g8
## Running the example
@@ -41,8 +17,8 @@ To run Hello World:
1. In a console, change directories to the top level of the unzipped project.
- For example, if you used the default project name,
akka-grpc-quickstart-scala, and extracted the project to your root directory,
- from the root directory, enter: `cd akka-grpc-quickstart-scala`
+ For example, if you used the default project name,
pekko-grpc-quickstart-scala, and extracted the project to your root directory,
+ from the root directory, enter: `cd pekko-grpc-quickstart-scala`
1. Compile the project by entering:
@@ -121,7 +97,7 @@ To run Hello World:
```
-Congratulations, you just ran your first Akka gRPC server and client. Now take
a look at what happened under the covers.
+Congratulations, you just ran your first Pekko gRPC server and client. Now
take a look at what happened under the covers.
You can end the programs with `ctrl-c`.
@@ -131,8 +107,8 @@ As you saw in the console output, the example outputs
several greetings. Let’s
### Server
-First, the `GreeterServer` main class creates an
`akka.actor.typed.ActorSystem`, a container in which Actors,
-Akka Streams and Akka HTTP run. Next, it defines a function from `HttpRequest`
to `Future[HttpResponse]` using the `GreeterServiceImpl`. This function
+First, the `GreeterServer` main class creates an
`org.apache.pekko..actor.typed.ActorSystem`, a container in which Actors,
+Pekko Streams and Pekko HTTP run. Next, it defines a function from
`HttpRequest` to `Future[HttpResponse]` using the `GreeterServiceImpl`. This
function
handles gRPC requests in the HTTP/2 server and is bound to port 8080 in this
example.
@@snip
[GreeterServer.scala]($g8src$/scala/com/example/helloworld/GreeterServer.scala)
{ #import #server }
@@ -143,7 +119,7 @@ in the protobuf file `src/main/protobuf/helloworld.proto`:
@@snip [helloworld.proto]($g8src$/protobuf/helloworld.proto) {
#service-request-reply }
When compiling the project several things are generated from the proto
definition. You can find the generated files in
-@sbt[`target/scala-2.13/akka-grpc/main/`]@maven[`target/generated-sources/`]@gradle[`build/generated/source/proto/main/`]
+@sbt[`target/scala-2.13/pekko-grpc/main/`]@maven[`target/generated-sources/`]@gradle[`build/generated/source/proto/main/`]
if you are curious.
For the server the following classes are generated:
@@ -174,7 +150,7 @@ We need an `ActorSystem` and then the
`GreeterServiceClient` can be created and
@@snip
[GreeterClient.scala]($g8src$/scala/com/example/helloworld/GreeterClient.scala)
{ #import #client-request-reply }
-Note that clients and servers don't have to be implemented with Akka gRPC.
They can be implemented/used with other libraries or languages and interoperate
according to the gRPC specification.
+Note that clients and servers don't have to be implemented with Pekko gRPC.
They can be implemented/used with other libraries or languages and interoperate
according to the gRPC specification.
### Other types of calls
diff --git a/docs/src/main/paradox/streaming.md
b/docs/src/main/paradox/streaming.md
index d0a93b7..8989d7e 100644
--- a/docs/src/main/paradox/streaming.md
+++ b/docs/src/main/paradox/streaming.md
@@ -145,8 +145,8 @@ This method is generated in the `GreeterService` interface
and we have to implem
@@snip
[GreeterServiceImpl.scala]($g8src$/scala/com/example/helloworld/GreeterServiceImpl.scala)
{ #import #service-stream }
-To connect all input and output streams of all connected clients dynamically
we use a
[MergeHub](https://doc.akka.io/docs/akka/current/stream/stream-dynamic.html#using-the-mergehub)
for the incoming
-messages and a
[BroadcastHub](https://doc.akka.io/docs/akka/current/stream/stream-dynamic.html#using-the-broadcasthub)
for the outgoing messages.
+To connect all input and output streams of all connected clients dynamically
we use a
[MergeHub](https://pekko.apache.org/docs/pekko/current/stream/stream-dynamic.html#using-the-mergehub)
for the incoming
+messages and a
[BroadcastHub](https://pekko.apache.org/docs/pekko/current/stream/stream-dynamic.html#using-the-broadcasthub)
for the outgoing messages.
The `MergeHub` and `BroadcastHub` are only needed because we want to connect
different clients with each other.
If each client was separate it might look like this to have the stream of
incoming messages from one client
diff --git a/docs/src/main/paradox/testing.md b/docs/src/main/paradox/testing.md
index b005700..3d6f083 100644
--- a/docs/src/main/paradox/testing.md
+++ b/docs/src/main/paradox/testing.md
@@ -23,5 +23,5 @@ be tested without binding it to a HTTP server.
As an exercise to increase your understanding you could add tests for the
@ref[streaming call](streaming.md), both as
integration test and unit test style.
-The Akka documentation of [Testing
streams](https://doc.akka.io/docs/akka/current/stream/stream-testkit.html) might
+The Pekko documentation of [Testing
streams](https://pekko.apache.org/docs/pekko/current/stream/stream-testkit.html)
might
be useful.
diff --git a/project/build.properties b/project/build.properties
index 2743082..e8a1e24 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -1 +1 @@
-sbt.version=1.9.6
+sbt.version=1.9.7
diff --git a/project/paradox.sbt b/project/paradox.sbt
index 3e62e80..4f96752 100644
--- a/project/paradox.sbt
+++ b/project/paradox.sbt
@@ -1,2 +1,9 @@
-// sbt-paradox, used for documentation
-addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.10.5")
+// We have to deliberately use older versions of sbt-paradox because current
Pekko sbt build
+// only loads on JDK 1.8 so we need to bring in older versions of parboiled
which support JDK 1.8
+addSbtPlugin(("org.apache.pekko" % "pekko-sbt-paradox" % "1.0.0").excludeAll(
+ "com.lightbend.paradox", "sbt-paradox",
+ "com.lightbend.paradox" % "sbt-paradox-apidoc",
+ "com.lightbend.paradox" % "sbt-paradox-project-info"))
+addSbtPlugin(("com.lightbend.paradox" % "sbt-paradox" % "0.9.2").force())
+addSbtPlugin(("com.lightbend.paradox" % "sbt-paradox-apidoc" %
"0.10.1").force())
+addSbtPlugin(("com.lightbend.paradox" % "sbt-paradox-project-info" %
"2.0.0").force())
diff --git a/project/project-info.conf b/project/project-info.conf
new file mode 100644
index 0000000..e365342
--- /dev/null
+++ b/project/project-info.conf
@@ -0,0 +1,3 @@
+project-info {
+
+}
diff --git a/src/main/g8/build.gradle b/src/main/g8/build.gradle
index 571c30d..56bbb85 100644
--- a/src/main/g8/build.gradle
+++ b/src/main/g8/build.gradle
@@ -1,36 +1,30 @@
buildscript {
repositories {
gradlePluginPortal()
- maven {
- url "https://repo.akka.io/maven"
- }
}
}
plugins {
id 'java'
id 'application'
- id 'com.lightbend.akka.grpc.gradle' version '$akka_grpc_version$'
+ id 'org.apache.pekko.grpc.gradle' version '$pekko_grpc_version$'
}
repositories {
mavenCentral()
- maven {
- url "https://repo.akka.io/maven"
- }
}
dependencies {
implementation 'org.scala-lang:scala-library:2.13.12'
- implementation 'com.typesafe.akka:akka-actor-typed_2.13:$akka_version$'
- implementation 'com.typesafe.akka:akka-discovery_2.13:$akka_version$'
- implementation 'com.typesafe.akka:akka-stream_2.13:$akka_version$'
- implementation 'com.typesafe.akka:akka-pki_2.13:$akka_version$'
+ implementation 'org.apache.pekko:pekko-actor-typed_2.13:$pekko_version$'
+ implementation 'org.apache.pekko:pekko-discovery_2.13:$pekko_version$'
+ implementation 'org.apache.pekko:pekko-stream_2.13:$pekko_version$'
+ implementation 'org.apache.pekko:pekko-pki_2.13:$pekko_version$'
- implementation 'ch.qos.logback:logback-classic:1.2.3'
+ implementation 'ch.qos.logback:logback-classic:1.2.13'
- testImplementation
'com.typesafe.akka:akka-actor-testkit-typed_2.13:$akka_version$'
- testImplementation
'com.typesafe.akka:akka-stream-testkit_2.13:$akka_version$'
- testImplementation 'org.scalatest:scalatest_2.13:3.2.12'
+ testImplementation
'org.apache.pekko:pekko-actor-testkit-typed_2.13:$pekko_version$'
+ testImplementation
'org.apache.pekko:pekko-stream-testkit_2.13:$pekko_version$'
+ testImplementation 'org.scalatest:scalatest_2.13:3.2.17'
// optional in Scalatest
testRuntimeOnly 'com.vladsch.flexmark:flexmark-all:0.62.2'
// Required by https://github.com/maiflai/gradle-scalatest
diff --git a/src/main/g8/build.sbt b/src/main/g8/build.sbt
index 825de71..1b63deb 100644
--- a/src/main/g8/build.sbt
+++ b/src/main/g8/build.sbt
@@ -1,13 +1,13 @@
-name := "akka-grpc-quickstart-scala"
+name := "pekko-grpc-quickstart-scala"
version := "1.0"
scalaVersion := "$scala_version$"
-lazy val akkaVersion = "$akka_version$"
-lazy val akkaGrpcVersion = "$akka_grpc_version$"
+lazy val pekkoVersion = "$pekko_version$"
+lazy val pekkoGrpcVersion = "$pekko_grpc_version$"
-enablePlugins(AkkaGrpcPlugin)
+enablePlugins(PekkoGrpcPlugin)
// Run in a separate JVM, to make sure sbt waits until all threads have
// finished before returning.
@@ -15,17 +15,15 @@ enablePlugins(AkkaGrpcPlugin)
// sbt tasks, consider https://github.com/spray/sbt-revolver/
fork := true
-resolvers += "Akka library repository".at("https://repo.akka.io/maven")
-
libraryDependencies ++= Seq(
- "com.typesafe.akka" %% "akka-actor-typed" % akkaVersion,
- "com.typesafe.akka" %% "akka-stream" % akkaVersion,
- "com.typesafe.akka" %% "akka-discovery" % akkaVersion,
- "com.typesafe.akka" %% "akka-pki" % akkaVersion,
+ "org.apache.pekko" %% "pekko-actor-typed" % pekkoVersion,
+ "org.apache.pekko" %% "pekko-stream" % pekkoVersion,
+ "org.apache.pekko" %% "pekko-discovery" % pekkoVersion,
+ "org.apache.pekko" %% "pekko-pki" % pekkoVersion,
- "ch.qos.logback" % "logback-classic" % "1.2.3",
+ "ch.qos.logback" % "logback-classic" % "1.2.13",
- "com.typesafe.akka" %% "akka-actor-testkit-typed" % akkaVersion % Test,
- "com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test,
- "org.scalatest" %% "scalatest" % "3.2.12" % Test
+ "org.apache.pekko" %% "pekko-actor-testkit-typed" % pekkoVersion % Test,
+ "org.apache.pekko" %% "pekko-stream-testkit" % pekkoVersion % Test,
+ "org.scalatest" %% "scalatest" % "3.2.17" % Test
)
diff --git a/src/main/g8/default.properties b/src/main/g8/default.properties
index 4982e63..8e8e95a 100644
--- a/src/main/g8/default.properties
+++ b/src/main/g8/default.properties
@@ -1,7 +1,7 @@
-name = akka-grpc-quickstart-scala
-description = Akka gRPC is a toolkit for building streaming gRPC servers and
clients on top of Akka Streams. This simple application will get you started
building gRPC based systems with Scala. This app uses Akka, Scala, and
ScalaTest.
-akka_grpc_version=2.4.0
-akka_version=2.9.0
+name = pekko-grpc-quickstart-scala
+description = Pekko gRPC is a toolkit for building streaming gRPC servers and
clients on top of Pekko Streams. This simple application will get you started
building gRPC based systems with Scala. This app uses Pekko, Scala, and
ScalaTest.
+pekko_grpc_version=1.0.1
+pekko_version=1.02
sbt_version=maven(org.scala-sbt, sbt, stable)
scala_major_version=2.13
scala_version=2.13.12
diff --git a/src/main/g8/pom.xml b/src/main/g8/pom.xml
index a82432f..c460847 100644
--- a/src/main/g8/pom.xml
+++ b/src/main/g8/pom.xml
@@ -3,87 +3,72 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>Akka gRPC Scala example project</name>
+ <name>Pekko gRPC Scala example project</name>
<groupId>com.example.helloworld</groupId>
- <artifactId>akka-grpc-helloworld-scala</artifactId>
+ <artifactId>pekko-grpc-helloworld-scala</artifactId>
<version>0.1-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
- <akka.version>$akka_version$</akka.version>
- <akka.grpc.version>$akka_grpc_version$</akka.grpc.version>
+ <pekko.version>$pekko_version$</pekko.version>
+ <pekko.grpc.version>$pekko_grpc_version$</pekko.grpc.version>
<scala.binary.version>$scala_major_version$</scala.binary.version>
<project.encoding>UTF-8</project.encoding>
</properties>
- <repositories>
- <repository>
- <id>akka-repository</id>
- <name>Akka library repository</name>
- <url>https://repo.akka.io/maven</url>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>akka-repository</id>
- <name>Akka library repository</name>
- <url>https://repo.akka.io/maven</url>
- </pluginRepository>
- </pluginRepositories>
-
<dependencies>
<dependency>
- <groupId>com.typesafe.akka</groupId>
- <artifactId>akka-actor-typed_\${scala.binary.version}</artifactId>
- <version>\${akka.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-actor-typed_\${scala.binary.version}</artifactId>
+ <version>\${pekko.version}</version>
</dependency>
<dependency>
- <groupId>com.typesafe.akka</groupId>
- <artifactId>akka-discovery_\${scala.binary.version}</artifactId>
- <version>\${akka.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-discovery_\${scala.binary.version}</artifactId>
+ <version>\${pekko.version}</version>
</dependency>
<dependency>
- <groupId>com.typesafe.akka</groupId>
- <artifactId>akka-stream_\${scala.binary.version}</artifactId>
- <version>\${akka.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-stream_\${scala.binary.version}</artifactId>
+ <version>\${pekko.version}</version>
</dependency>
<dependency>
- <groupId>com.typesafe.akka</groupId>
- <artifactId>akka-pki_\${scala.binary.version}</artifactId>
- <version>\${akka.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-pki_\${scala.binary.version}</artifactId>
+ <version>\${pekko.version}</version>
</dependency>
<dependency>
- <groupId>com.lightbend.akka.grpc</groupId>
- <artifactId>akka-grpc-runtime_\${scala.binary.version}</artifactId>
- <version>\${akka.grpc.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-grpc-runtime_\${scala.binary.version}</artifactId>
+ <version>\${pekko.grpc.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
- <version>1.2.3</version>
+ <version>1.2.13</version>
</dependency>
<dependency>
- <groupId>com.typesafe.akka</groupId>
-
<artifactId>akka-actor-testkit-typed_\${scala.binary.version}</artifactId>
- <version>\${akka.version}</version>
+ <groupId>org.apache.pekko</groupId>
+
<artifactId>pekko-actor-testkit-typed_\${scala.binary.version}</artifactId>
+ <version>\${pekko.version}</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.typesafe.akka</groupId>
- <artifactId>akka-stream-testkit_\${scala.binary.version}</artifactId>
- <version>\${akka.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-stream-testkit_\${scala.binary.version}</artifactId>
+ <version>\${pekko.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_\${scala.binary.version}</artifactId>
- <version>3.2.12</version>
+ <version>3.2.17</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -105,9 +90,9 @@
</plugin>
<plugin>
- <groupId>com.lightbend.akka.grpc</groupId>
- <artifactId>akka-grpc-maven-plugin</artifactId>
- <version>\${akka.grpc.version}</version>
+ <groupId>org.apache.pekko</groupId>
+ <artifactId>pekko-grpc-maven-plugin</artifactId>
+ <version>\${pekko.grpc.version}</version>
<configuration>
<language>Scala</language>
</configuration>
diff --git a/src/main/g8/project/plugins.sbt b/src/main/g8/project/plugins.sbt
index 6ddf2c4..ed05c34 100644
--- a/src/main/g8/project/plugins.sbt
+++ b/src/main/g8/project/plugins.sbt
@@ -1,5 +1,3 @@
-resolvers += "Akka library repository".at("https://repo.akka.io/maven")
-
-addSbtPlugin("com.lightbend.akka.grpc" % "sbt-akka-grpc" %
"$akka_grpc_version$")
+addSbtPlugin("org.apache.pekko" % "sbt-pekko-grpc" % "$pekko_grpc_version$")
addSbtPlugin("com.lightbend.sbt" % "sbt-javaagent" % "0.1.5")
diff --git a/src/main/g8/src/main/resources/application.conf
b/src/main/g8/src/main/resources/application.conf
index 0cf9442..dcecd59 100644
--- a/src/main/g8/src/main/resources/application.conf
+++ b/src/main/g8/src/main/resources/application.conf
@@ -1,4 +1,4 @@
-akka.grpc.client {
+pekko.grpc.client {
"helloworld.GreeterService" {
host = 127.0.0.1
port = 8080
diff --git a/src/main/g8/src/main/resources/logback.xml
b/src/main/g8/src/main/resources/logback.xml
index 203596d..87102bb 100644
--- a/src/main/g8/src/main/resources/logback.xml
+++ b/src/main/g8/src/main/resources/logback.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- This is a development logging configuration that logs to standard
out, for an example of a production
- logging config, see the Akka docs:
https://doc.akka.io/docs/akka/2.6/typed/logging.html#logback -->
+ logging config, see the Pekko docs:
https://pekko.apache.org/docs/pekko/current/typed/logging.html#logback -->
<appender name="STDOUT" target="System.out"
class="ch.qos.logback.core.ConsoleAppender">
<encoder>
- <pattern>[%date{ISO8601}] [%level] [%logger] [%thread]
[%X{akkaSource}] - %msg%n</pattern>
+ <pattern>[%date{ISO8601}] [%level] [%logger] [%thread]
[%X{pekkoSource}] - %msg%n</pattern>
</encoder>
</appender>
diff --git
a/src/main/g8/src/main/scala/com/example/helloworld/GreeterClient.scala
b/src/main/g8/src/main/scala/com/example/helloworld/GreeterClient.scala
index fc1f834..b2599ab 100644
--- a/src/main/g8/src/main/scala/com/example/helloworld/GreeterClient.scala
+++ b/src/main/g8/src/main/scala/com/example/helloworld/GreeterClient.scala
@@ -3,14 +3,14 @@ package com.example.helloworld
//#import
import scala.concurrent.duration._
import scala.concurrent.{ExecutionContext, Future}
-import scala.util.Failure
-import scala.util.Success
-import akka.Done
-import akka.NotUsed
-import akka.actor.typed.ActorSystem
-import akka.actor.typed.scaladsl.Behaviors
-import akka.grpc.GrpcClientSettings
-import akka.stream.scaladsl.Source
+import scala.util.{Failure, Success}
+import org.apache.pekko
+import pekko.Done
+import pekko.NotUsed
+import pekko.actor.typed.ActorSystem
+import pekko.actor.typed.scaladsl.Behaviors
+import pekko.grpc.GrpcClientSettings
+import pekko.stream.scaladsl.Source
//#import
diff --git
a/src/main/g8/src/main/scala/com/example/helloworld/GreeterServer.scala
b/src/main/g8/src/main/scala/com/example/helloworld/GreeterServer.scala
index 10d367c..e49a5ec 100644
--- a/src/main/g8/src/main/scala/com/example/helloworld/GreeterServer.scala
+++ b/src/main/g8/src/main/scala/com/example/helloworld/GreeterServer.scala
@@ -10,15 +10,16 @@ import java.security.cert.CertificateFactory
import scala.io.Source
-import akka.actor.typed.ActorSystem
-import akka.actor.typed.scaladsl.Behaviors
-import akka.http.scaladsl.ConnectionContext
-import akka.http.scaladsl.Http
-import akka.http.scaladsl.HttpsConnectionContext
-import akka.http.scaladsl.model.HttpRequest
-import akka.http.scaladsl.model.HttpResponse
-import akka.pki.pem.DERPrivateKeyLoader
-import akka.pki.pem.PEMDecoder
+import org.apache.pekko
+import pekko.actor.typed.ActorSystem
+import pekko.actor.typed.scaladsl.Behaviors
+import pekko.http.scaladsl.ConnectionContext
+import pekko.http.scaladsl.Http
+import pekko.http.scaladsl.HttpsConnectionContext
+import pekko.http.scaladsl.model.HttpRequest
+import pekko.http.scaladsl.model.HttpResponse
+import pekko.pki.pem.DERPrivateKeyLoader
+import pekko.pki.pem.PEMDecoder
import com.typesafe.config.ConfigFactory
import javax.net.ssl.KeyManagerFactory
import javax.net.ssl.SSLContext
@@ -36,7 +37,7 @@ object GreeterServer {
def main(args: Array[String]): Unit = {
// important to enable HTTP/2 in ActorSystem's config
- val conf = ConfigFactory.parseString("akka.http.server.enable-http2 = on")
+ val conf = ConfigFactory.parseString("pekko.http.server.enable-http2 = on")
.withFallback(ConfigFactory.defaultApplication())
val system = ActorSystem[Nothing](Behaviors.empty[Nothing],
"GreeterServer", conf)
new GreeterServer(system).run()
diff --git
a/src/main/g8/src/main/scala/com/example/helloworld/GreeterServiceImpl.scala
b/src/main/g8/src/main/scala/com/example/helloworld/GreeterServiceImpl.scala
index b9ed19a..cce2bdf 100644
--- a/src/main/g8/src/main/scala/com/example/helloworld/GreeterServiceImpl.scala
+++ b/src/main/g8/src/main/scala/com/example/helloworld/GreeterServiceImpl.scala
@@ -3,13 +3,14 @@ package com.example.helloworld
//#import
import scala.concurrent.Future
-import akka.NotUsed
-import akka.actor.typed.ActorSystem
-import akka.stream.scaladsl.BroadcastHub
-import akka.stream.scaladsl.Keep
-import akka.stream.scaladsl.MergeHub
-import akka.stream.scaladsl.Sink
-import akka.stream.scaladsl.Source
+import org.apache.pekko
+import pekko.NotUsed
+import pekko.actor.typed.ActorSystem
+import pekko.stream.scaladsl.BroadcastHub
+import pekko.stream.scaladsl.Keep
+import pekko.stream.scaladsl.MergeHub
+import pekko.stream.scaladsl.Sink
+import pekko.stream.scaladsl.Source
//#import
diff --git
a/src/main/g8/src/test/scala/com/example/helloworld/GreeterServiceImplSpec.scala
b/src/main/g8/src/test/scala/com/example/helloworld/GreeterServiceImplSpec.scala
index 029e6e3..6f9f392 100644
---
a/src/main/g8/src/test/scala/com/example/helloworld/GreeterServiceImplSpec.scala
+++
b/src/main/g8/src/test/scala/com/example/helloworld/GreeterServiceImplSpec.scala
@@ -1,8 +1,9 @@
//#full-example
package com.example.helloworld
-import akka.actor.testkit.typed.scaladsl.ActorTestKit
-import akka.actor.typed.ActorSystem
+import org.apache.pekko
+import pekko.actor.testkit.typed.scaladsl.ActorTestKit
+import pekko.actor.typed.ActorSystem
import org.scalatest.BeforeAndAfterAll
import org.scalatest.concurrent.ScalaFutures
diff --git
a/src/main/g8/src/test/scala/com/example/helloworld/GreeterSpec.scala
b/src/main/g8/src/test/scala/com/example/helloworld/GreeterSpec.scala
index 2ae7843..df72446 100644
--- a/src/main/g8/src/test/scala/com/example/helloworld/GreeterSpec.scala
+++ b/src/main/g8/src/test/scala/com/example/helloworld/GreeterSpec.scala
@@ -1,10 +1,11 @@
//#full-example
package com.example.helloworld
-import akka.actor.testkit.typed.scaladsl.ActorTestKit
-import akka.actor.typed.ActorSystem
-import akka.actor.typed.scaladsl.Behaviors
-import akka.grpc.GrpcClientSettings
+import org.apache.pekko
+import pekko.actor.testkit.typed.scaladsl.ActorTestKit
+import pekko.actor.typed.ActorSystem
+import pekko.actor.typed.scaladsl.Behaviors
+import pekko.grpc.GrpcClientSettings
import com.typesafe.config.ConfigFactory
@@ -24,7 +25,7 @@ class GreeterSpec
implicit val patience: PatienceConfig = PatienceConfig(scaled(5.seconds),
scaled(100.millis))
// important to enable HTTP/2 in server ActorSystem's config
- val conf = ConfigFactory.parseString("akka.http.server.enable-http2 = on")
+ val conf = ConfigFactory.parseString("pekko.http.server.enable-http2 = on")
.withFallback(ConfigFactory.defaultApplication())
val testKit = ActorTestKit(conf)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]