Skip to content

Commit

Permalink
Merge pull request #7 from coreywoodfield/pekko
Browse files Browse the repository at this point in the history
Migrate from akka to pekko
  • Loading branch information
tmccombs committed Feb 26, 2024
2 parents 0224382 + b4c11e1 commit 2c3374e
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 32 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Test
run: sbt test
publish:
if: ${{ github.event_name != 'pull_request' }} && (github.repository == 'lucidsoftware/akka-thread-context')
if: ${{ github.event_name != 'pull_request' }} && (github.repository == 'lucidsoftware/pekko-thread-context')
needs: build
runs-on: ubuntu-20.04
steps:
Expand All @@ -54,7 +54,7 @@ jobs:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
release:
if: ${{ startsWith(github.ref, 'refs/tags') && (github.repository == 'lucidsoftware/akka-thread-context') }}
if: ${{ startsWith(github.ref, 'refs/tags') && (github.repository == 'lucidsoftware/pekko-thread-context') }}
runs-on: ubuntu-latest
needs: build
steps:
Expand All @@ -66,8 +66,4 @@ jobs:
- name: Upload Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
 tag="${GITHUB_REF#refs/tags/}"
 targets=($(printf -- "-a %s " */target/*.jar))
 hub release create "${targets[@]}" -m "Release $tag" $tag
run: bash release.sh
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Akka actor thread context
# Pekko actor thread context

[![Build Status](https://travis-ci.com/lucidsoftware/akka-thread-context.svg?branch=master)](https://travis-ci.com/lucidsoftware/akka-thread-context)
![Maven Version](https://img.shields.io/maven-central/v/com.lucidchart/akka-actor-thread-context_2.11.svg)
[![Build Status](https://travis-ci.com/lucidsoftware/pekko-thread-context.svg?branch=master)](https://travis-ci.com/lucidsoftware/pekko-thread-context)
![Maven Version](https://img.shields.io/maven-central/v/com.lucidchart/pekko-actor-thread-context_2.13.svg)

Propagate thread-local values across Akka actors. See
Propagate thread-local values across Pekko actors. See
[java-thread-context](https://github.com/lucidsoftware/java-thread-context).

Currently works only for local actor systems.

## Install

```scala
libraryDependencies += "com.lucidchart" %% "akka-actor-thread-context" % "<version>"
libraryDependencies += "com.lucidchart" %% "pekko-actor-thread-context" % "<version>"
```

## Usage

In the configuration for your actor system,

```hocon
actor.default-dispatcher.type = com.lucidchart.akka.threadcontext.DefaultDispatcherConfigurator
actor.default-dispatcher.type = com.lucidchart.pekko.threadcontext.DefaultDispatcherConfigurator
```
14 changes: 7 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
lazy val `akka-actor-thread-context` = project.cross
lazy val `pekko-actor-thread-context` = project.cross

lazy val commonSettings = Seq(publishTo := sonatypePublishToBundle.value)

lazy val `akka-actor-thread-context_2.12` = `akka-actor-thread-context`("2.12.14").settings(commonSettings)
lazy val `akka-actor-thread-context_2.13` = `akka-actor-thread-context`("2.13.6").settings(commonSettings)
lazy val `pekko-actor-thread-context_2.12` = `pekko-actor-thread-context`("2.12.14").settings(commonSettings)
lazy val `pekko-actor-thread-context_2.13` = `pekko-actor-thread-context`("2.13.12").settings(commonSettings)

inScope(Global)(Seq(
credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", sys.env.getOrElse("SONATYPE_USERNAME", ""), sys.env.getOrElse("SONATYPE_PASSWORD", "")),
developers += Developer("pauldraper", "Paul Draper", "paulddraper@gmail.com", url("https://github.com/pauldraper")),
homepage := Some(url("https://git.lucidchart.com/lucidsoftware/akka-thread-context")),
homepage := Some(url("https://git.lucidchart.com/lucidsoftware/pekko-thread-context")),
licenses += "Apache 2.0 License" -> url("https://www.apache.org/licenses/LICENSE-2.0"),
organization := "com.lucidchart",
organizationHomepage := Some(url("http://github.com/lucidsoftware")),
organizationName := "Lucid Software",
resolvers += Resolver.typesafeRepo("releases"),
scalaVersion := "2.13.6",
scalaVersion := "2.13.12",
scmInfo := Some(ScmInfo(
url("https://github.com/lucidsoftware/akka-thread-context"),
"scm:git:git@github.com:lucidsoftware/akka-thread-context.git"
url("https://github.com/lucidsoftware/pekko-thread-context"),
"scm:git:git@github.com:lucidsoftware/pekko-thread-context.git"
)),
startYear := Some(2017),
publishMavenStyle := true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % "2.6.15",
"org.apache.pekko" %% "pekko-actor" % "1.0.2",
"com.lucidchart" % "thread-context" % "0.7"
)
publishTo := sonatypePublishToBundle.value
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.lucidchart.akka.threadcontext
package com.lucidchart.pekko.threadcontext

import akka.dispatch.{Dispatcher, DispatcherPrerequisites, MessageDispatcherConfigurator}
import org.apache.pekko.dispatch.{Dispatcher, DispatcherPrerequisites, MessageDispatcherConfigurator}
import com.github.threadcontext.Context
import com.typesafe.config.Config
import java.util.concurrent.TimeUnit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.lucidchart.akka.threadcontext
package com.lucidchart.pekko.threadcontext

import akka.dispatch.{Dispatcher, DispatcherPrerequisites, MessageDispatcherConfigurator}
import org.apache.pekko.dispatch.{Dispatcher, DispatcherPrerequisites, MessageDispatcherConfigurator}
import com.github.threadcontext.Context
import com.typesafe.config.Config
import java.util.concurrent.TimeUnit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.lucidchart.akka.threadcontext
package com.lucidchart.pekko.threadcontext

import akka.dispatch.{Dispatcher, DispatcherPrerequisites, MessageDispatcherConfigurator}
import org.apache.pekko.dispatch.{Dispatcher, DispatcherPrerequisites, MessageDispatcherConfigurator}
import com.github.threadcontext.Context
import com.typesafe.config.Config
import java.util.concurrent.TimeUnit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.lucidchart.akka.threadcontext
package com.lucidchart.pekko.threadcontext

import akka.dispatch.DispatcherPrerequisites
import org.apache.pekko.dispatch.DispatcherPrerequisites
import com.github.threadcontext.Context
import com.typesafe.config.Config

Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.5.4
sbt.version=1.8.2
4 changes: 2 additions & 2 deletions project/build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")

addSbtPlugin("com.lucidchart" % "sbt-cross" % "4.0")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.2")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.18")
6 changes: 6 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -x
tag="${GITHUB_REF#refs/tags/}"
targets=($(printf -- "-a %s " */target/*.jar))
hub release create "${targets[@]}" -m "Release $tag" $tag

0 comments on commit 2c3374e

Please sign in to comment.