diff --git a/build.sbt b/build.sbt index 89f95d81..ba7317fe 100644 --- a/build.sbt +++ b/build.sbt @@ -131,14 +131,24 @@ lazy val eventsourced = // provides offset storage backed by Kafka managed offset commits lazy val kafka = Project(id = "kafka", base = file("kafka")) - .configs(IntegrationTest) .enablePlugins(ReproducibleBuildsPlugin) - .settings(headerSettings(IntegrationTest)) - .settings(Defaults.itSettings) + .settings(crossScalaVersions := Dependencies.Scala2And3Versions) .settings(Dependencies.kafka) .settings( name := "pekko-projection-kafka") .dependsOn(core) + +lazy val kafkaTest = + Project(id = "kafka-test", base = file("kafka-test")) + .configs(IntegrationTest) + .enablePlugins(ReproducibleBuildsPlugin) + .settings(headerSettings(IntegrationTest)) + .settings(Defaults.itSettings) + .settings(Dependencies.kafkaTest) + .settings( + name := "pekko-projection-kafka-test", + publish / skip := true) + .dependsOn(kafka) .dependsOn(testkit % Test) .dependsOn(slick % "test->test;it->it") @@ -169,7 +179,7 @@ lazy val examples = project .dependsOn(cassandra % "test->test;test->it") .dependsOn(eventsourced) .dependsOn(`durable-state`) - .dependsOn(kafka % "test->test") + .dependsOn(kafkaTest % "test->test") .dependsOn(testkit % Test) .settings(publish / skip := true, scalacOptions += "-feature", javacOptions += "-parameters") @@ -207,7 +217,7 @@ lazy val docs = project apidocRootPackage := "org.apache.pekko") lazy val root = Project(id = "projection", base = file(".")) - .aggregate(core, coreTest, testkit, jdbc, slick, cassandra, eventsourced, kafka, `durable-state`, examples, docs) + .aggregate(core, coreTest, testkit, jdbc, slick, cassandra, eventsourced, kafka, kafkaTest, `durable-state`, examples, docs) .settings( publish / skip := true, name := "pekko-projection-root") diff --git a/kafka/src/it/resources/application.conf b/kafka-test/src/it/resources/application.conf similarity index 100% rename from kafka/src/it/resources/application.conf rename to kafka-test/src/it/resources/application.conf diff --git a/kafka/src/it/resources/logback-test.xml b/kafka-test/src/it/resources/logback-test.xml similarity index 100% rename from kafka/src/it/resources/logback-test.xml rename to kafka-test/src/it/resources/logback-test.xml diff --git a/kafka/src/it/scala/org/apache/pekko/projection/kafka/KafkaSourceProviderSpec.scala b/kafka-test/src/it/scala/org/apache/pekko/projection/kafka/KafkaSourceProviderSpec.scala similarity index 100% rename from kafka/src/it/scala/org/apache/pekko/projection/kafka/KafkaSourceProviderSpec.scala rename to kafka-test/src/it/scala/org/apache/pekko/projection/kafka/KafkaSourceProviderSpec.scala diff --git a/kafka/src/it/scala/org/apache/pekko/projection/kafka/KafkaSpecBase.scala b/kafka-test/src/it/scala/org/apache/pekko/projection/kafka/KafkaSpecBase.scala similarity index 100% rename from kafka/src/it/scala/org/apache/pekko/projection/kafka/KafkaSpecBase.scala rename to kafka-test/src/it/scala/org/apache/pekko/projection/kafka/KafkaSpecBase.scala diff --git a/kafka/src/it/scala/org/apache/pekko/projection/kafka/integration/KafkaToSlickIntegrationSpec.scala b/kafka-test/src/it/scala/org/apache/pekko/projection/kafka/integration/KafkaToSlickIntegrationSpec.scala similarity index 100% rename from kafka/src/it/scala/org/apache/pekko/projection/kafka/integration/KafkaToSlickIntegrationSpec.scala rename to kafka-test/src/it/scala/org/apache/pekko/projection/kafka/integration/KafkaToSlickIntegrationSpec.scala diff --git a/kafka/src/test/resources/application.conf b/kafka-test/src/test/resources/application.conf similarity index 100% rename from kafka/src/test/resources/application.conf rename to kafka-test/src/test/resources/application.conf diff --git a/kafka/src/test/resources/logback-test.xml b/kafka-test/src/test/resources/logback-test.xml similarity index 100% rename from kafka/src/test/resources/logback-test.xml rename to kafka-test/src/test/resources/logback-test.xml diff --git a/kafka/src/test/scala/org/apache/pekko/projection/kafka/internal/KafkaSourceProviderImplSpec.scala b/kafka-test/src/test/scala/org/apache/pekko/projection/kafka/internal/KafkaSourceProviderImplSpec.scala similarity index 100% rename from kafka/src/test/scala/org/apache/pekko/projection/kafka/internal/KafkaSourceProviderImplSpec.scala rename to kafka-test/src/test/scala/org/apache/pekko/projection/kafka/internal/KafkaSourceProviderImplSpec.scala diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 5792442b..cf416a99 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -188,7 +188,10 @@ object Dependencies { val kafka = deps ++= Seq( Compile.connectorsKafka, - Compile.jackson, + Compile.jackson) + + val kafkaTest = + deps ++= Seq( Test.scalatest, Test.pekkoTypedTestkit, Test.pekkoStreamTestkit,