Skip to content

Commit

Permalink
Merge branch 'master' into add-sbt-mima-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvanoosten authored Apr 10, 2024
2 parents 2475716 + fcb4456 commit a57e00a
Show file tree
Hide file tree
Showing 37 changed files with 1,110 additions and 495 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/benchs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
if: ${{ !github.event.pull_request.head.repo.fork }} # comes from https://github.com/orgs/community/discussions/25217#discussioncomment-3246904
steps:
- name: Checkout current branch
uses: actions/checkout@v3
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v3.12.0
uses: actions/setup-java@v4.2.1
with:
distribution: temurin
java-version: 17
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ jobs:
continue-on-error: true
steps:
- name: Git Checkout
uses: actions/checkout@v4.1.0
uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.13.0
uses: actions/setup-java@v4.2.1
with:
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
uses: coursier/cache-action@v6.4.5
- name: Check all code compiles
run: sbt +Test/compile
- name: Check artifacts build process
Expand All @@ -48,19 +48,19 @@ jobs:
continue-on-error: false
steps:
- name: Git Checkout
uses: actions/checkout@v4.1.0
uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.13.0
uses: actions/setup-java@v4.2.1
with:
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
uses: coursier/cache-action@v6.4.5
- name: Check if the site workflow is up to date
run: sbt ciCheckGithubWorkflow
- name: Lint
Expand All @@ -80,15 +80,15 @@ jobs:
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.13.0
uses: actions/setup-java@v4.2.1
with:
distribution: corretto
java-version: ${{ matrix.java }}
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
uses: coursier/cache-action@v6.4.5
- name: Git Checkout
uses: actions/checkout@v4.1.0
uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: Test
Expand All @@ -100,19 +100,19 @@ jobs:
if: ${{ github.event_name == 'push' }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.1.0
uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.13.0
uses: actions/setup-java@v4.2.1
with:
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
uses: coursier/cache-action@v6.4.5
- name: Generate Readme
run: sbt docs/generateReadme
- name: Commit Changes
Expand All @@ -129,7 +129,7 @@ jobs:
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5.0.2
uses: peter-evans/create-pull-request@v6.0.2
with:
body: |-
Autogenerated changes after running the `sbt docs/generateReadme` command of the [zio-sbt-website](https://zio.dev/zio-sbt) plugin.
Expand Down Expand Up @@ -174,19 +174,19 @@ jobs:
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.1.0
uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.13.0
uses: actions/setup-java@v4.2.1
with:
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
uses: coursier/cache-action@v6.4.5
- name: Release
run: sbt ci-release
env:
Expand All @@ -203,21 +203,21 @@ jobs:
if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.1.0
uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v3.13.0
uses: actions/setup-java@v4.2.1
with:
distribution: corretto
java-version: '17'
check-latest: true
- name: Cache Dependencies
uses: coursier/cache-action@v6
uses: coursier/cache-action@v6.4.5
- name: Setup NodeJs
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.x
registry-url: https://registry.npmjs.org
Expand All @@ -234,7 +234,7 @@ jobs:
if: ${{ (github.event_name == 'release') && (github.event.action == 'published') }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.1.0
uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'
- name: notify the main repo about the new release of docs package
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.head.repo.fork }} # comes from https://github.com/orgs/community/discussions/25217#discussioncomment-3246904
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v3.12.0
uses: actions/setup-java@v4.2.1
with:
distribution: temurin
java-version: 17
check-latest: true
- uses: coursier/cache-action@v6
- uses: coursier/cache-action@v6.4.5
- uses: VirtusLab/scala-cli-setup@main
- name: Use CI sbt jvmopts
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
update_release_draft:
runs-on: ubuntu-20.04
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/scala-steward.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Scala Steward
steps:
- name: Scala Steward
uses: scala-steward-org/scala-steward-action@v2.61.0
uses: scala-steward-org/scala-steward-action@v2.65.0
with:
github-app-id: ${{ secrets.SCALA_STEWARD_GITHUB_APP_ID }}
github-app-installation-id: ${{ secrets.SCALA_STEWARD_GITHUB_APP_INSTALLATION_ID }}
Expand Down
29 changes: 0 additions & 29 deletions .mergify.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3.7.17
version=3.8.1
project.git = true
maxColumn = 120
align {
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[ZIO Kafka](https://github.com/zio/zio-kafka) is a Kafka client for ZIO. It provides a purely functional, streams-based interface to the Kafka client and integrates effortlessly with ZIO and ZIO Streams.

[![Production Ready](https://img.shields.io/badge/Project%20Stage-Production%20Ready-brightgreen.svg)](https://github.com/zio/zio/wiki/Project-Stages) ![CI Badge](https://github.com/zio/zio-kafka/workflows/CI/badge.svg) [![Sonatype Releases](https://img.shields.io/nexus/r/https/oss.sonatype.org/dev.zio/zio-kafka_2.13.svg?label=Sonatype%20Release)](https://oss.sonatype.org/content/repositories/releases/dev/zio/zio-kafka_2.13/) [![Sonatype Snapshots](https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-kafka_2.13.svg?label=Sonatype%20Snapshot)](https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-kafka_2.13/) [![javadoc](https://javadoc.io/badge2/dev.zio/zio-kafka-docs_2.13/javadoc.svg)](https://javadoc.io/doc/dev.zio/zio-kafka-docs_2.13) [![ZIO Kafka](https://img.shields.io/github/stars/zio/zio-kafka?style=social)](https://github.com/zio/zio-kafka)
[![Production Ready](https://img.shields.io/badge/Project%20Stage-Production%20Ready-brightgreen.svg)](https://github.com/zio/zio/wiki/Project-Stages) ![CI Badge](https://github.com/zio/zio-kafka/workflows/CI/badge.svg) [![Sonatype Releases](https://img.shields.io/nexus/r/https/oss.sonatype.org/dev.zio/zio-kafka_2.13.svg?label=Sonatype%20Release)](https://oss.sonatype.org/content/repositories/releases/dev/zio/zio-kafka_2.13/) [![Sonatype Snapshots](https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-kafka_2.13.svg?label=Sonatype%20Snapshot)](https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-kafka_2.13/) [![javadoc](https://javadoc.io/badge2/dev.zio/zio-kafka-docs_2.13/javadoc.svg)](https://javadoc.io/doc/dev.zio/zio-kafka-docs_2.13) [![ZIO Kafka](https://img.shields.io/github/stars/zio/zio-kafka?style=social)](https://github.com/zio/zio-kafka) [![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)

## Introduction

Expand All @@ -19,8 +19,8 @@ Kafka has a mature Java client for producing and consuming events, but it has a
In order to use this library, we need to add the following line in our `build.sbt` file:

```scala
libraryDependencies += "dev.zio" %% "zio-kafka" % "2.7.0"
libraryDependencies += "dev.zio" %% "zio-kafka-testkit" % "2.7.0" % Test
libraryDependencies += "dev.zio" %% "zio-kafka" % "2.7.4"
libraryDependencies += "dev.zio" %% "zio-kafka-testkit" % "2.7.4" % Test
```

## Example
Expand Down Expand Up @@ -151,4 +151,4 @@ This library is heavily inspired and made possible by the research and implement

[License](LICENSE)

Copyright 2021-2023 Itamar Ravid and the zio-kafka contributors.
Copyright 2021-2024 Itamar Ravid and the zio-kafka contributors.
39 changes: 23 additions & 16 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
import sbt.Def
import MimaSettings.mimaSettings

lazy val kafkaVersion = "3.6.0"
lazy val embeddedKafkaVersion = "3.6.0" // Should be the same as kafkaVersion, except for the patch part
lazy val kafkaVersion = "3.7.0"
lazy val embeddedKafkaVersion = "3.7.0" // Should be the same as kafkaVersion, except for the patch part

lazy val kafkaClients = "org.apache.kafka" % "kafka-clients" % kafkaVersion
lazy val scalaCollectionCompat = "org.scala-lang.modules" %% "scala-collection-compat" % "2.11.0"
lazy val logback = "ch.qos.logback" % "logback-classic" % "1.3.11"
lazy val logback = "ch.qos.logback" % "logback-classic" % "1.5.4"

enablePlugins(ZioSbtEcosystemPlugin, ZioSbtCiPlugin)

lazy val _scala213 = "2.13.13"
lazy val _scala3 = "3.3.3"

inThisBuild(
List(
name := "ZIO Kafka",
zioVersion := "2.0.19",
crossScalaVersions := List("2.13.12", "3.3.1"),
name := "ZIO Kafka",
zioVersion := "2.0.21",
scalaVersion := _scala213,
// zio-sbt defines these 'scala213' and 'scala3' settings, but we need to define them here to override the defaults and better control them
scala213 := _scala213,
scala3 := _scala3,
// We only support Scala 2.13+ and 3+. See https://github.com/zio/zio-kafka/releases/tag/v2.7.0
crossScalaVersions := List(scala213.value, scala3.value),
ciEnabledBranches := Seq("master", "series/0.x"),
useCoursier := false,
Test / parallelExecution := false,
Expand Down Expand Up @@ -103,8 +111,7 @@ lazy val zioKafka =
.settings(
libraryDependencies ++= Seq(
kafkaClients,
scalaCollectionCompat,
"dev.zio" %% "zio-concurrent" % zioVersion.value
scalaCollectionCompat
)
)

Expand Down Expand Up @@ -145,7 +152,7 @@ lazy val zioKafkaTest =
libraryDependencies ++= Seq(
kafkaClients,
logback % Test,
"dev.zio" %% "zio-logging-slf4j" % "2.1.16" % Test,
"dev.zio" %% "zio-logging-slf4j" % "2.2.2" % Test,
scalaCollectionCompat
) ++ `embedded-kafka`.value
)
Expand All @@ -168,13 +175,13 @@ lazy val zioKafkaExample =
.settings(run / fork := false)
.settings(
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % "2.0.19",
"dev.zio" %% "zio-kafka" % "2.7.0",
"dev.zio" %% "zio-kafka-testkit" % "2.7.0" % Test,
"dev.zio" %% "zio-test" % "2.0.19" % Test,
"ch.qos.logback" % "logback-classic" % "1.4.11",
"dev.zio" %% "zio-logging-slf4j2" % "2.1.16",
"io.github.embeddedkafka" %% "embedded-kafka" % embeddedKafkaVersion
"dev.zio" %% "zio" % "2.0.21",
"dev.zio" %% "zio-kafka" % "2.7.4",
"dev.zio" %% "zio-logging-slf4j2" % "2.2.2",
"io.github.embeddedkafka" %% "embedded-kafka" % embeddedKafkaVersion,
logback,
"dev.zio" %% "zio-kafka-testkit" % "2.7.4" % Test,
"dev.zio" %% "zio-test" % "2.0.21" % Test
),
// Scala 3 compiling fails with:
// [error] Modules were resolved with conflicting cross-version suffixes in ProjectRef(uri("file:/home/runner/work/zio-kafka/zio-kafka/"), "zioKafkaExample"):
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_label: "Getting Started"

[ZIO Kafka](https://github.com/zio/zio-kafka) is a Kafka client for ZIO. It provides a purely functional, streams-based interface to the Kafka client and integrates effortlessly with ZIO and ZIO Streams.

@PROJECT_BADGES@
@PROJECT_BADGES@ [![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)

## Introduction

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.9.7
sbt.version=1.9.9
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
val zioSbtVersion = "0.4.0-alpha.22"
val zioSbtVersion = "0.4.0-alpha.25"

addSbtPlugin("dev.zio" % "zio-sbt-ecosystem" % zioSbtVersion)
addSbtPlugin("dev.zio" % "zio-sbt-website" % zioSbtVersion)
addSbtPlugin("dev.zio" % "zio-sbt-ci" % zioSbtVersion)

addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.0")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import zio.kafka.serde.Serde
import zio.kafka.testkit.KafkaTestUtils.{ consumer, produceMany, producer }
import zio.kafka.testkit._
import zio.test.Assertion.hasSameElements
import zio.test.TestAspect.{ sequential, timeout }
import zio.test.TestAspect.timeout
import zio.test._

/**
Expand Down Expand Up @@ -41,5 +41,5 @@ object ConsumerSpec extends ZIOSpecDefault with KafkaRandom {
)
.provideSome[Kafka](producer) // Here, we provide a new instance of Producer per test
.provideSomeShared[Scope](Kafka.embedded) // Here, we provide an instance of Kafka for the entire suite
) @@ timeout(2.minutes) @@ sequential
) @@ timeout(2.minutes)
}
Loading

0 comments on commit a57e00a

Please sign in to comment.