Skip to content

Commit

Permalink
use addPekkoModuleDependency (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning authored Oct 18, 2024
1 parent 74de635 commit f6b4c7b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 36 deletions.
26 changes: 24 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* This file is part of the Apache Pekko project, which was derived from Akka.
*/

import com.github.pjfanning.pekkobuild._
import com.typesafe.sbt.packager.docker._
import net.bzzt.reproduciblebuilds.ReproducibleBuildsPlugin.reproducibleBuildsCheckResolver

Expand All @@ -16,8 +17,6 @@ sourceDistIncubating := false

val mimaCompareVersion = "1.0.0"

ThisBuild / resolvers += Resolver.ApacheMavenSnapshotsRepo

ThisBuild / reproducibleBuildsCheckResolver := Resolver.ApacheMavenStagingRepo

lazy val root = project
Expand All @@ -34,6 +33,18 @@ lazy val core = project
.in(file("core"))
.enablePlugins(Common, AutomateHeaderPlugin, MimaPlugin, MultiJvmPlugin, ReproducibleBuildsPlugin)
.dependsOn(cassandraLauncher % Test)
.addPekkoModuleDependency("pekko-connectors-cassandra", "", PekkoConnectorsDependency.default)
.addPekkoModuleDependency("pekko-persistence", "", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-persistence-query", "", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-stream", "", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-cluster-tools", "", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-persistence-typed", "test", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-cluster-typed", "test", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-actor-testkit-typed", "test", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-persistence-tck", "test", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-stream-testkit", "test", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-multi-node-testkit", "test", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-cluster-sharding", "test", PekkoCoreDependency.default)
.settings(
name := "pekko-persistence-cassandra",
libraryDependencies ++= Dependencies.pekkoPersistenceCassandraDependencies,
Expand Down Expand Up @@ -84,6 +95,14 @@ lazy val endToEndExample = project
.in(file("example"))
.dependsOn(core)
.disablePlugins(MimaPlugin)
.addPekkoModuleDependency("pekko-persistence-typed", "", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-discovery", "", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-serialization-jackson", "", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-cluster-sharding-typed", "", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-management", "", PekkoManagementDependency.default)
.addPekkoModuleDependency("pekko-management-cluster-bootstrap", "", PekkoManagementDependency.default)
.addPekkoModuleDependency("pekko-management-cluster-http", "", PekkoManagementDependency.default)
.addPekkoModuleDependency("pekko-discovery-kubernetes-api", "", PekkoManagementDependency.default)
.settings(
libraryDependencies ++= Dependencies.exampleDependencies, publish / skip := true,
// make version compatible with docker for publishing example project,
Expand Down Expand Up @@ -121,6 +140,9 @@ lazy val dseTest = project
.in(file("dse-test"))
.disablePlugins(MimaPlugin)
.dependsOn(core % "test->test")
.addPekkoModuleDependency("pekko-persistence-tck", "test", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-actor-testkit-typed", "test", PekkoCoreDependency.default)
.addPekkoModuleDependency("pekko-stream-testkit", "test", PekkoCoreDependency.default)
.settings(libraryDependencies ++= Dependencies.dseTestDependencies)

lazy val docs = project
Expand Down
35 changes: 1 addition & 34 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,60 +26,27 @@ object Dependencies {

val pekkoConnectorsVersion = PekkoConnectorsDependency.version
val pekkoConnectorsVersionInDocs = PekkoConnectorsDependency.default.link
// for example
val pekkoManagementVersion = "1.1.0-M1"

val logbackVersion = "1.3.14"

val nettyVersion = "4.1.114.Final"
val logback = "ch.qos.logback" % "logback-classic" % logbackVersion

val reconcilerDependencies = Seq(
"org.apache.pekko" %% "pekko-actor-testkit-typed" % pekkoVersion % Test,
"org.apache.pekko" %% "pekko-stream-testkit" % pekkoVersion % Test)

val pekkoTestDeps = Seq(
"org.apache.pekko" %% "pekko-persistence",
"org.apache.pekko" %% "pekko-persistence-typed",
"org.apache.pekko" %% "pekko-persistence-query",
"org.apache.pekko" %% "pekko-cluster-typed",
"org.apache.pekko" %% "pekko-actor-testkit-typed",
"org.apache.pekko" %% "pekko-persistence-tck",
"org.apache.pekko" %% "pekko-stream-testkit",
"org.apache.pekko" %% "pekko-multi-node-testkit",
"org.apache.pekko" %% "pekko-cluster-sharding")

val pekkoPersistenceCassandraDependencies = Seq(
"org.apache.pekko" %% "pekko-connectors-cassandra" % pekkoConnectorsVersion,
"org.apache.pekko" %% "pekko-persistence" % pekkoVersion,
"org.apache.pekko" %% "pekko-persistence-query" % pekkoVersion,
"org.apache.pekko" %% "pekko-stream" % pekkoVersion,
"org.apache.pekko" %% "pekko-cluster-tools" % pekkoVersion,
"org.apache.cassandra" % "java-driver-core" % driverVersion,
"io.netty" % "netty-handler" % nettyVersion,
logback % Test,
"org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0" % Test,
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
"org.pegdown" % "pegdown" % "1.6.0" % Test,
"org.osgi" % "org.osgi.core" % "6.0.0" % Provided) ++ pekkoTestDeps.map(_ % pekkoVersion % Test)
"org.osgi" % "org.osgi.core" % "6.0.0" % Provided)

val exampleDependencies = Seq(
logback,
"org.apache.pekko" %% "pekko-persistence-typed" % pekkoVersion,
"org.apache.pekko" %% "pekko-discovery" % pekkoVersion,
"org.apache.pekko" %% "pekko-serialization-jackson" % pekkoVersion,
"org.apache.pekko" %% "pekko-cluster-sharding-typed" % pekkoVersion,
"org.apache.pekko" %% "pekko-management" % pekkoManagementVersion,
"org.apache.pekko" %% "pekko-management-cluster-bootstrap" % pekkoManagementVersion,
"org.apache.pekko" %% "pekko-management-cluster-http" % pekkoManagementVersion,
"org.apache.pekko" %% "pekko-discovery-kubernetes-api" % pekkoManagementVersion,
"org.hdrhistogram" % "HdrHistogram" % "2.1.12")

val dseTestDependencies = Seq(
"com.datastax.dse" % "dse-java-driver-core" % "2.3.0" % Test,
"org.apache.pekko" %% "pekko-persistence-tck" % pekkoVersion % Test,
"org.apache.pekko" %% "pekko-actor-testkit-typed" % pekkoVersion % Test,
"org.apache.pekko" %% "pekko-stream-testkit" % pekkoVersion % Test,
logback % Test)

val docsDependencies = Seq(
Expand Down
24 changes: 24 additions & 0 deletions project/PekkoManagementDependency.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import com.github.pjfanning.pekkobuild.PekkoDependency

object PekkoManagementDependency extends PekkoDependency {
override val checkProject: String = "pekko-discovery-aws-api-async"
override val module: Option[String] = Some("management")
override val currentVersion: String = "1.1.0-M1"
}

0 comments on commit f6b4c7b

Please sign in to comment.