Use the Scala 2.13 builds of Kafka

Proprietary

Kafka 4.0 dropped Scala 2.12 (KIP-751), so kafka_2.12 and kafka-streams-scala_2.12, and the older Scala builds, have no 4.x release. Switch them to their _2.13 artifacts, keeping the version, which Kafka has published for Scala 2.13 since 2.4.

io.moderne.kafka.MigrateKafkaScalaArtifactsTo213
mod run . --recipe=io.moderne.kafka.MigrateKafkaScalaArtifactsTo213

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change Gradle or Maven dependency org.apache.kafka:kafka_2.10
  2. Change Gradle or Maven dependency org.apache.kafka:kafka_2.11
  3. Change Gradle or Maven dependency org.apache.kafka:kafka_2.12
  4. Change Gradle or Maven dependency org.apache.kafka:kafka-streams-scala_2.11
  5. Change Gradle or Maven dependency org.apache.kafka:kafka-streams-scala_2.12