2023-05-29 03:35:14 +01:00
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* license agreements; and to You under the Apache License, version 2.0:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
2023-06-22 14:19:26 +01:00
* This file is part of the Apache Pekko project, which was derived from Akka.
2023-05-29 03:35:14 +01:00
*/
2023-07-28 14:47:48 +02:00
import net.bzzt.reproduciblebuilds.ReproducibleBuildsPlugin.reproducibleBuildsCheckResolver
2019-04-19 07:53:27 +01:00
2020-12-09 15:20:13 +07:00
ThisBuild / scalafixScalaBinaryVersion := scalaBinaryVersion.value
2021-12-14 11:00:02 +01:00
scalaVersion := Dependencies.allScalaVersions.head
2023-02-12 14:14:49 +01:00
ThisBuild / apacheSonatypeProjectProfile := "pekko"
2023-06-01 01:11:33 +02:00
ThisBuild / versionScheme := Some(VersionScheme.SemVerSpec)
2023-07-04 00:18:28 +01:00
sourceDistName := "apache-pekko"
sourceDistIncubating := true
2023-02-12 14:14:49 +01:00
2023-07-26 12:22:34 +02:00
commands := commands.value.filterNot { command =>
command.nameOption.exists { name =>
name.contains("sonatypeRelease") || name.contains("sonatypeBundleRelease")
}
}
2023-07-28 14:47:48 +02:00
ThisBuild / reproducibleBuildsCheckResolver :=
"Apache Pekko Staging".at("https://repository.apache.org/content/groups/staging/")
2019-04-19 07:53:27 +01:00
enablePlugins(
UnidocRoot,
UnidocWithPrValidation,
NoPublish,
CopyrightHeader,
2019-01-12 01:41:54 +08:00
CopyrightHeaderInPr,
ScalafixIgnoreFilePlugin,
JavaFormatterPlugin)
2016-03-10 10:45:35 +02:00
disablePlugins(MimaPlugin)
2020-07-22 22:32:40 +02:00
2023-08-01 09:47:22 +02:00
addCommandAlias("verifyCodeStyle", "scalafmtCheckAll; scalafmtSbtCheck; javafmtCheckAll; headerCheckAll")
addCommandAlias("applyCodeStyle", "headerCreateAll; scalafmtAll; scalafmtSbt; javafmtAll")
2020-07-22 22:32:40 +02:00
2018-12-05 16:30:21 +08:00
addCommandAlias(
2019-03-28 13:24:46 +01:00
name = "fixall",
2021-02-01 15:38:29 +00:00
value = ";scalafixEnable; scalafixAll; scalafmtAll; test:compile; multi-jvm:compile; reload")
2020-04-27 20:32:18 +08:00
2021-02-01 15:38:29 +00:00
addCommandAlias(name = "sortImports", value = ";scalafixEnable; scalafixAll SortImports; scalafmtAll")
2019-03-28 13:24:46 +01:00
2023-07-30 11:55:14 +02:00
import PekkoBuild._
import MultiJvmPlugin.MultiJvmKeys.MultiJvm
2019-01-12 01:41:54 +08:00
import com.typesafe.tools.mima.plugin.MimaPlugin
2020-05-17 00:09:24 +02:00
import sbt.Keys.{ initialCommands, parallelExecution }
2019-01-12 01:41:54 +08:00
import spray.boilerplate.BoilerplatePlugin
2017-05-16 22:03:18 +02:00
initialize := {
// Load system properties from a file to make configuration from Jenkins easier
2023-01-05 11:10:50 +01:00
loadSystemProperties("project/pekko-build.properties")
2017-05-16 22:03:18 +02:00
initialize.value
}
2019-04-19 07:53:27 +01:00
shellPrompt := { s =>
Project.extract(s).currentProject.id + " > "
}
2017-05-16 22:03:18 +02:00
resolverSettings
2018-09-03 12:42:13 +02:00
// When this is updated the set of modules in ActorSystem.allModules should also be updated
2020-11-30 16:39:14 +01:00
lazy val userProjects: Seq[ProjectReference] = List[ProjectReference](
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
2019-07-11 14:04:24 +02:00
actor,
actorTestkitTyped,
actorTyped,
cluster,
clusterMetrics,
clusterSharding,
clusterShardingTyped,
clusterTools,
clusterTyped,
coordination,
discovery,
distributedData,
jackson,
multiNodeTestkit,
osgi,
persistence,
persistenceQuery,
persistenceTyped,
2020-03-20 22:18:43 +09:00
persistenceTestkit,
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
2019-07-11 14:04:24 +02:00
protobuf,
2019-08-15 16:43:19 +01:00
protobufV3,
2020-05-17 00:09:24 +02:00
pki,
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
2019-07-11 14:04:24 +02:00
remote,
slf4j,
stream,
streamTestkit,
streamTyped,
testkit)
2019-04-19 07:53:27 +01:00
2020-11-30 16:39:14 +01:00
lazy val aggregatedProjects: Seq[ProjectReference] = userProjects ++ List[ProjectReference](
actorTests,
actorTypedTests,
benchJmh,
docs,
billOfMaterials,
persistenceShared,
persistenceTck,
persistenceTypedTests,
remoteTests,
streamTests,
streamTestsTck)
2022-12-02 10:49:40 +01:00
lazy val root = Project(id = "pekko", base = file("."))
2019-04-19 07:53:27 +01:00
.aggregate(aggregatedProjects: _*)
2023-01-05 11:10:50 +01:00
.settings(
name := "pekko-root")
2019-04-19 07:53:27 +01:00
.settings(rootSettings: _*)
2021-02-01 15:38:29 +00:00
.settings(
2022-11-12 10:21:24 +01:00
UnidocRoot.autoImport.unidocRootIgnoreProjects := Seq(
2021-02-01 15:38:29 +00:00
remoteTests,
benchJmh,
protobuf,
protobufV3,
2023-02-17 10:49:40 +01:00
pekkoScalaNightly,
2021-02-01 15:38:29 +00:00
docs,
serialversionRemoverPlugin))
2023-02-02 22:46:41 +01:00
.settings(
2023-02-15 20:31:53 +01:00
Compile / headerCreate / unmanagedSources := (baseDirectory.value / "project").**("*.scala").get)
2022-12-02 14:49:16 +01:00
.settings(PekkoBuild.welcomeSettings)
2019-04-19 07:53:27 +01:00
.enablePlugins(CopyrightHeaderForBuild)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val actor = pekkoModule("actor")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.actor)
.settings(OSGi.actor)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.actor"))
2023-02-22 16:10:24 +01:00
.settings(AddMetaInfLicenseFiles.actorSettings)
2021-05-25 12:50:51 +02:00
.settings(Compile / unmanagedSourceDirectories += {
2019-04-19 07:53:27 +01:00
val ver = scalaVersion.value.take(4)
2021-05-25 12:50:51 +02:00
(Compile / scalaSource).value.getParentFile / s"scala-$ver"
2019-04-19 07:53:27 +01:00
})
2017-10-30 03:13:14 +02:00
.settings(VersionGenerator.settings)
2021-02-01 15:38:29 +00:00
.settings(serialversionRemoverPluginSettings)
2017-10-30 03:13:14 +02:00
.enablePlugins(BoilerplatePlugin)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val actorTests = pekkoModule("actor-tests")
2022-03-13 08:46:08 +01:00
.dependsOn(testkit % "compile->compile;test->test", actor)
2017-10-30 03:13:14 +02:00
.settings(Dependencies.actorTests)
.enablePlugins(NoPublish)
2021-08-17 19:04:27 +12:00
.disablePlugins(MimaPlugin)
2017-05-16 22:03:18 +02:00
2023-02-17 10:49:40 +01:00
lazy val pekkoScalaNightly = pekkoModule("scala-nightly")
2019-04-18 15:41:02 +02:00
.aggregate(aggregatedProjects: _*)
2017-10-30 03:13:14 +02:00
.disablePlugins(MimaPlugin)
2018-03-13 23:45:55 +09:00
.disablePlugins(ValidatePullRequest, MimaPlugin, CopyrightHeaderInPr)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val benchJmh = pekkoModule("bench-jmh")
2019-12-05 16:40:05 +01:00
.enablePlugins(Jdk9)
.dependsOn(Seq(actor, actorTyped, stream, streamTestkit, persistence, distributedData, jackson, testkit).map(
2019-04-19 07:53:27 +01:00
_ % "compile->compile;compile->test"): _*)
2017-10-30 03:13:14 +02:00
.settings(Dependencies.benchJmh)
2019-06-13 21:53:21 +02:00
.settings(javacOptions += "-parameters") // for Jackson
2018-03-13 23:45:55 +09:00
.enablePlugins(JmhPlugin, ScaladocNoVerificationOfDiagrams, NoPublish, CopyrightHeader)
2021-08-17 19:04:27 +12:00
.disablePlugins(MimaPlugin, ValidatePullRequest, CopyrightHeaderInPr)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val cluster = pekkoModule("cluster")
2020-05-25 12:21:13 +02:00
.dependsOn(
remote,
coordination % "compile->compile;test->test",
remoteTests % "test->test",
testkit % "test->test",
jackson % "test->test")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.cluster)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.cluster"))
2023-03-25 13:03:29 +01:00
.settings(AddMetaInfLicenseFiles.clusterSettings)
2017-10-30 03:13:14 +02:00
.settings(OSGi.cluster)
.settings(Protobuf.settings)
2021-05-25 12:50:51 +02:00
.settings(Test / parallelExecution := false)
2017-05-16 22:03:18 +02:00
.configs(MultiJvm)
2017-10-30 03:13:14 +02:00
.enablePlugins(MultiNodeScalaTest)
2023-01-05 11:10:50 +01:00
lazy val clusterMetrics = pekkoModule("cluster-metrics")
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
2019-07-11 14:04:24 +02:00
.dependsOn(
cluster % "compile->compile;test->test;multi-jvm->multi-jvm",
slf4j % "test->compile",
jackson % "test->test")
2017-10-30 03:13:14 +02:00
.settings(OSGi.clusterMetrics)
.settings(Dependencies.clusterMetrics)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.cluster.metrics"))
2017-10-30 03:13:14 +02:00
.settings(Protobuf.settings)
.settings(SigarLoader.sigarSettings)
2021-05-25 12:50:51 +02:00
.settings(Test / parallelExecution := false)
2017-05-16 22:03:18 +02:00
.configs(MultiJvm)
2017-10-30 03:13:14 +02:00
.enablePlugins(MultiNodeScalaTest)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val clusterSharding = pekkoModule("cluster-sharding")
2023-01-23 11:09:03 +00:00
// TODO pekko-persistence dependency should be provided in pom.xml artifact.
2019-04-19 07:53:27 +01:00
// If I only use "provided" here it works, but then we can't run tests.
// Scope "test" is alright in the pom.xml, but would have been nicer with
// provided.
2017-05-16 22:03:18 +02:00
.dependsOn(
2017-10-30 03:13:14 +02:00
cluster % "compile->compile;test->test;multi-jvm->multi-jvm",
distributedData,
2018-04-11 03:45:26 +02:00
persistence % "compile->compile",
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
2019-07-11 14:04:24 +02:00
clusterTools % "compile->compile;test->test",
jackson % "test->test")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.clusterSharding)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.cluster.sharding"))
2017-10-30 03:13:14 +02:00
.settings(OSGi.clusterSharding)
.settings(Protobuf.settings)
2017-05-22 15:56:57 +02:00
.configs(MultiJvm)
2017-10-30 03:13:14 +02:00
.enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams)
2020-05-28 08:35:27 +01:00
.enablePlugins(Jdk9)
2017-05-22 15:56:57 +02:00
2023-01-05 11:10:50 +01:00
lazy val clusterTools = pekkoModule("cluster-tools")
2020-05-25 12:21:13 +02:00
.dependsOn(
cluster % "compile->compile;test->test;multi-jvm->multi-jvm",
coordination % "compile->compile;test->test",
jackson % "test->test")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.clusterTools)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.cluster.tools"))
2017-10-30 03:13:14 +02:00
.settings(OSGi.clusterTools)
.settings(Protobuf.settings)
2017-05-22 15:56:57 +02:00
.configs(MultiJvm)
2017-10-30 03:13:14 +02:00
.enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams)
2017-05-22 15:56:57 +02:00
2023-01-05 11:10:50 +01:00
lazy val distributedData = pekkoModule("distributed-data")
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
2019-07-11 14:04:24 +02:00
.dependsOn(cluster % "compile->compile;test->test;multi-jvm->multi-jvm", jackson % "test->test")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.distributedData)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.cluster.ddata"))
2023-06-21 09:30:25 +01:00
.settings(AddMetaInfLicenseFiles.distributedDataSettings)
2017-10-30 03:13:14 +02:00
.settings(OSGi.distributedData)
.settings(Protobuf.settings)
2017-05-16 22:03:18 +02:00
.configs(MultiJvm)
2017-10-30 03:13:14 +02:00
.enablePlugins(MultiNodeScalaTest)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val docs = pekkoModule("docs")
2022-11-12 10:21:24 +01:00
.configs(Jdk9.TestJdk9)
2017-05-22 15:56:57 +02:00
.dependsOn(
2019-04-19 07:53:27 +01:00
actor,
cluster,
clusterMetrics,
slf4j,
osgi,
persistenceTck,
persistenceQuery,
distributedData,
stream,
2019-12-05 16:40:05 +01:00
stream % "TestJdk9->CompileJdk9",
2019-04-19 07:53:27 +01:00
actorTyped,
2017-05-22 15:56:57 +02:00
clusterTools % "compile->compile;test->test",
2017-07-06 08:05:48 -07:00
clusterSharding % "compile->compile;test->test",
2020-06-09 17:33:52 +02:00
discovery % "compile->compile;test->test",
2017-05-22 15:56:57 +02:00
testkit % "compile->compile;test->test",
remote % "compile->compile;test->test",
2018-04-11 03:45:26 +02:00
persistence % "compile->compile;test->test",
2017-12-18 14:50:46 +00:00
actorTyped % "compile->compile;test->test",
persistenceTyped % "compile->compile;test->test",
clusterTyped % "compile->compile;test->test",
clusterShardingTyped % "compile->compile;test->test",
actorTypedTests % "compile->compile;test->test",
2020-03-20 22:18:43 +09:00
streamTestkit % "compile->compile;test->test",
persistenceTestkit % "compile->compile;test->test")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.docs)
2022-12-02 14:49:16 +01:00
.settings(PekkoDisciplinePlugin.docs)
2019-09-09 05:25:33 -07:00
.settings(Paradox.settings)
2020-03-25 12:52:05 +01:00
.settings(javacOptions += "-parameters") // for Jackson
2018-04-18 11:44:37 +02:00
.enablePlugins(
2023-01-07 13:31:41 +01:00
ParadoxPlugin,
2023-02-10 09:55:33 +01:00
PekkoParadoxPlugin,
2019-04-19 07:53:27 +01:00
NoPublish,
ParadoxBrowse,
2018-04-18 11:44:37 +02:00
ScaladocNoVerificationOfDiagrams,
2019-12-05 16:40:05 +01:00
StreamOperatorsIndexGenerator,
Jdk9)
2021-08-17 19:04:27 +12:00
.disablePlugins(MimaPlugin)
2020-12-09 15:20:13 +07:00
.disablePlugins((if (ScalafixSupport.fixTestScope) Nil else Seq(ScalafixPlugin)): _*)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val jackson = pekkoModule("serialization-jackson")
2019-08-15 16:43:19 +01:00
.dependsOn(
actor,
actorTyped % "optional->compile",
stream % "optional->compile",
actorTests % "test->test",
testkit % "test->test")
2018-02-11 19:56:52 +01:00
.settings(Dependencies.jackson)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.serialization.jackson"))
2018-02-11 19:56:52 +01:00
.settings(OSGi.jackson)
.settings(javacOptions += "-parameters")
.enablePlugins(ScaladocNoVerificationOfDiagrams)
2023-01-05 11:10:50 +01:00
lazy val multiNodeTestkit = pekkoModule("multi-node-testkit")
2017-05-22 15:56:57 +02:00
.dependsOn(remote, testkit)
2019-05-29 09:50:28 +01:00
.settings(Dependencies.multiNodeTestkit)
2017-10-30 03:13:14 +02:00
.settings(Protobuf.settings)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.remote.testkit"))
2022-12-02 14:49:16 +01:00
.settings(PekkoBuild.mayChangeSettings)
2017-05-22 15:56:57 +02:00
2023-01-05 11:10:50 +01:00
lazy val osgi = pekkoModule("osgi")
2017-05-22 15:56:57 +02:00
.dependsOn(actor)
2017-10-30 03:13:14 +02:00
.settings(Dependencies.osgi)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.osgi"))
2017-10-30 03:13:14 +02:00
.settings(OSGi.osgi)
2023-05-27 23:42:26 +01:00
.settings(Test / parallelExecution := false)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val persistence = pekkoModule("persistence")
2019-10-07 11:02:08 +02:00
.dependsOn(actor, stream, testkit % "test->test")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.persistence)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.persistence"))
2017-10-30 03:13:14 +02:00
.settings(OSGi.persistence)
.settings(Protobuf.settings)
2021-05-25 12:50:51 +02:00
.settings(Test / fork := true)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val persistenceQuery = pekkoModule("persistence-query")
2021-12-09 13:30:59 +01:00
.dependsOn(
stream,
persistence % "compile->compile;test->test",
remote % "provided",
2021-12-14 12:47:45 +01:00
protobufV3,
2021-12-09 13:30:59 +01:00
streamTestkit % "test")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.persistenceQuery)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.persistence.query"))
2017-10-30 03:13:14 +02:00
.settings(OSGi.persistenceQuery)
2021-12-09 13:30:59 +01:00
.settings(Protobuf.settings)
// To be able to import ContainerFormats.proto
2023-01-23 11:09:03 +00:00
.settings(Protobuf.importPath := Some(baseDirectory.value / ".." / "remote" / "src" / "main" / "protobuf"))
2021-05-25 12:50:51 +02:00
.settings(Test / fork := true)
2017-10-30 03:13:14 +02:00
.enablePlugins(ScaladocNoVerificationOfDiagrams)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val persistenceShared = pekkoModule("persistence-shared")
2019-10-07 11:02:08 +02:00
.dependsOn(persistence % "test->test", testkit % "test->test", remote % "test")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.persistenceShared)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.persistence.shared"))
2021-05-25 12:50:51 +02:00
.settings(Test / fork := true)
2017-10-30 03:13:14 +02:00
.enablePlugins(NoPublish)
2021-08-17 19:04:27 +12:00
.disablePlugins(MimaPlugin)
2017-05-22 15:56:57 +02:00
2023-01-05 11:10:50 +01:00
lazy val persistenceTck = pekkoModule("persistence-tck")
2018-04-11 03:45:26 +02:00
.dependsOn(persistence % "compile->compile;test->test", testkit % "compile->compile;test->test")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.persistenceTck)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.persistence.tck"))
2019-03-28 13:24:46 +01:00
// .settings(OSGi.persistenceTck) TODO: we do need to export this as OSGi bundle too?
2021-05-25 12:50:51 +02:00
.settings(Test / fork := true)
2017-10-30 03:13:14 +02:00
.disablePlugins(MimaPlugin)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val persistenceTestkit = pekkoModule("persistence-testkit")
2020-03-24 07:59:33 +01:00
.dependsOn(
persistenceTyped % "compile->compile;provided->provided;test->test",
testkit % "compile->compile;test->test",
2020-04-29 22:06:42 +02:00
actorTestkitTyped,
2020-03-24 07:59:33 +01:00
persistenceTck % "test")
2020-03-20 22:18:43 +09:00
.settings(Dependencies.persistenceTestKit)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.persistence.testkit"))
2020-03-20 22:18:43 +09:00
.disablePlugins(MimaPlugin)
2023-01-05 11:10:50 +01:00
lazy val persistenceTypedTests = pekkoModule("persistence-typed-tests")
2021-06-02 17:15:18 +02:00
.dependsOn(
persistenceTyped,
persistenceTestkit % "test",
actorTestkitTyped % "test",
persistence % "test->test", // for SteppingInMemJournal
jackson % "test->test")
2022-12-02 14:49:16 +01:00
.settings(PekkoBuild.mayChangeSettings)
2020-06-24 15:37:20 +01:00
.settings(Dependencies.persistenceTypedTests)
2020-07-30 17:03:46 +01:00
.settings(javacOptions += "-parameters") // for Jackson
2020-06-24 15:37:20 +01:00
.disablePlugins(MimaPlugin)
.enablePlugins(NoPublish)
2023-01-05 11:10:50 +01:00
lazy val protobuf = pekkoModule("protobuf")
2017-10-30 03:13:14 +02:00
.settings(OSGi.protobuf)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.protobuf"))
2023-02-12 14:14:49 +01:00
.settings(AddMetaInfLicenseFiles.protobufSettings)
2017-10-30 03:13:14 +02:00
.enablePlugins(ScaladocNoVerificationOfDiagrams)
.disablePlugins(MimaPlugin)
2020-12-09 15:20:13 +07:00
.settings(autoScalaLibrary := false) // Pure java project
2017-05-22 15:56:57 +02:00
2023-01-05 11:10:50 +01:00
lazy val protobufV3 = pekkoModule("protobuf-v3")
2020-06-15 13:44:11 +02:00
.settings(OSGi.protobufV3)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.protobuf.v3"))
2023-02-22 16:10:24 +01:00
.settings(AddMetaInfLicenseFiles.protobufV3Settings)
2019-08-15 16:43:19 +01:00
.enablePlugins(ScaladocNoVerificationOfDiagrams)
.disablePlugins(MimaPlugin)
.settings(
2020-04-27 11:15:10 +02:00
libraryDependencies += Dependencies.Compile.Provided.protobufRuntime,
2021-05-25 12:50:51 +02:00
assembly / assemblyShadeRules := Seq(
2019-08-15 16:43:19 +01:00
ShadeRule
2022-11-12 10:21:24 +01:00
.rename("com.google.protobuf.**" -> "org.apache.pekko.protobufv3.internal.@1")
2020-07-01 11:03:28 +02:00
// https://github.com/sbt/sbt-assembly/issues/400
.inLibrary(Dependencies.Compile.Provided.protobufRuntime)
.inProject),
2023-02-14 13:45:08 +01:00
assembly / assemblyOption := (assembly / assemblyOption).value.withIncludeScala(false).withIncludeBin(true),
2019-08-15 16:43:19 +01:00
autoScalaLibrary := false, // do not include scala dependency in pom
exportJars := true, // in dependent projects, use assembled and shaded jar
makePomConfiguration := makePomConfiguration.value
.withConfigurations(Vector(Compile)), // prevent original dependency to be added to pom as runtime dep
2021-05-25 12:50:51 +02:00
Compile / packageBin / packagedArtifact := Scoped.mkTuple2(
(Compile / packageBin / artifact).value,
2020-11-30 16:39:14 +01:00
ReproducibleBuildsPlugin.postProcessJar(OsgiKeys.bundle.value)),
2021-05-25 12:50:51 +02:00
Compile / packageBin := ReproducibleBuildsPlugin
.postProcessJar((Compile / assembly).value), // package by running assembly
2023-02-14 13:45:08 +01:00
// Prevent cyclic task dependencies, see https://github.com/sbt/sbt-assembly/issues/365 by
// redefining the fullClasspath with just what we need to avoid the cyclic task dependency
assembly / fullClasspath := (Runtime / managedClasspath).value ++ (Compile / products).value.map(Attributed.blank),
2021-05-25 12:50:51 +02:00
assembly / test := {}, // assembly runs tests for unknown reason which introduces another cyclic dependency to packageBin via exportedJars
2023-01-23 11:09:03 +00:00
description := "Apache Pekko Protobuf V3 is a shaded version of the protobuf runtime. Original POM: https://github.com/protocolbuffers/protobuf/blob/v3.9.0/java/pom.xml")
2019-08-15 16:43:19 +01:00
2020-05-17 00:09:24 +02:00
lazy val pki =
2023-01-05 11:10:50 +01:00
pekkoModule("pki")
2020-05-17 00:09:24 +02:00
.dependsOn(actor) // this dependency only exists for "@ApiMayChange"
.settings(Dependencies.pki)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.pki"))
2020-05-17 00:09:24 +02:00
.disablePlugins(MimaPlugin)
2019-08-15 16:43:19 +01:00
lazy val remote =
2023-01-05 11:10:50 +01:00
pekkoModule("remote")
2019-08-15 16:43:19 +01:00
.dependsOn(
actor,
stream,
2020-06-05 17:34:44 +02:00
pki,
2019-08-15 16:43:19 +01:00
protobuf % "test",
actorTests % "test->test",
testkit % "test->test",
streamTestkit % "test",
jackson % "test->test")
.settings(Dependencies.remote)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.remote"))
2023-03-06 15:04:59 +01:00
.settings(AddMetaInfLicenseFiles.remoteSettings)
2019-08-15 16:43:19 +01:00
.settings(OSGi.remote)
.settings(Protobuf.settings)
2021-05-25 12:50:51 +02:00
.settings(Test / parallelExecution := false)
2021-07-21 20:24:33 +02:00
.settings(serialversionRemoverPluginSettings)
2019-12-16 11:45:13 +01:00
.enablePlugins(Jdk9)
2017-05-22 15:56:57 +02:00
2023-01-05 11:10:50 +01:00
lazy val remoteTests = pekkoModule("remote-tests")
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
2019-07-11 14:04:24 +02:00
.dependsOn(
actorTests % "test->test",
2020-03-24 07:59:33 +01:00
remote % "compile->CompileJdk9;test->test",
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
2019-07-11 14:04:24 +02:00
streamTestkit % "test",
multiNodeTestkit,
jackson % "test->test")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.remoteTests)
.settings(Protobuf.settings)
2021-05-25 12:50:51 +02:00
.settings(Test / parallelExecution := false)
2017-05-22 15:56:57 +02:00
.configs(MultiJvm)
2017-10-30 03:13:14 +02:00
.enablePlugins(MultiNodeScalaTest, NoPublish)
2021-08-17 19:04:27 +12:00
.disablePlugins(MimaPlugin)
2017-05-22 15:56:57 +02:00
2023-01-05 11:10:50 +01:00
lazy val slf4j = pekkoModule("slf4j")
2017-05-22 15:56:57 +02:00
.dependsOn(actor, testkit % "test->test")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.slf4j)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.slf4j"))
2017-10-30 03:13:14 +02:00
.settings(OSGi.slf4j)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val stream = pekkoModule("stream")
2019-08-15 16:43:19 +01:00
.dependsOn(actor, protobufV3)
2017-10-30 03:13:14 +02:00
.settings(Dependencies.stream)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.stream"))
2017-10-30 03:13:14 +02:00
.settings(OSGi.stream)
2018-01-02 18:43:27 +01:00
.settings(Protobuf.settings)
2018-07-02 16:38:07 +02:00
.enablePlugins(BoilerplatePlugin, Jdk9)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val streamTestkit = pekkoModule("stream-testkit")
2017-05-16 22:03:18 +02:00
.dependsOn(stream, testkit % "compile->compile;test->test")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.streamTestkit)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.stream.testkit"))
2017-10-30 03:13:14 +02:00
.settings(OSGi.streamTestkit)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val streamTests = pekkoModule("stream-tests")
2022-11-12 10:21:24 +01:00
.configs(Jdk9.TestJdk9)
2020-03-10 15:01:19 +01:00
.dependsOn(streamTestkit % "test->test", remote % "test->test", stream % "TestJdk9->CompileJdk9")
2017-10-30 03:13:14 +02:00
.settings(Dependencies.streamTests)
2019-12-05 16:40:05 +01:00
.enablePlugins(NoPublish, Jdk9)
2021-08-17 19:04:27 +12:00
.disablePlugins(MimaPlugin)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val streamTestsTck = pekkoModule("stream-tests-tck")
2017-05-16 22:03:18 +02:00
.dependsOn(streamTestkit % "test->test", stream)
2017-10-30 03:13:14 +02:00
.settings(Dependencies.streamTestsTck)
.settings(
// These TCK tests are using System.gc(), which
// is causing long GC pauses when running with G1 on
// the CI build servers. Therefore we fork these tests
// to run with small heap without G1.
2021-05-25 12:50:51 +02:00
Test / fork := true)
2017-10-30 03:13:14 +02:00
.enablePlugins(NoPublish)
2021-08-17 19:04:27 +12:00
.disablePlugins(MimaPlugin)
2017-10-30 03:13:14 +02:00
2023-01-05 11:10:50 +01:00
lazy val testkit = pekkoModule("testkit")
2017-10-30 03:13:14 +02:00
.dependsOn(actor)
.settings(Dependencies.testkit)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.actor.testkit"))
2017-10-30 03:13:14 +02:00
.settings(OSGi.testkit)
2022-11-12 10:21:24 +01:00
.settings(initialCommands += "import org.apache.pekko.testkit._")
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val actorTyped = pekkoModule("actor-typed")
2019-11-05 19:34:03 +01:00
.dependsOn(actor, slf4j)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.actor.typed"))
2019-08-23 13:00:00 +01:00
.settings(Dependencies.actorTyped)
2018-11-12 20:10:20 +01:00
.settings(OSGi.actorTyped)
2019-04-19 07:53:27 +01:00
.settings(initialCommands :=
"""
2023-01-04 10:48:08 +01:00
import org.apache.pekko
import pekko.actor.typed._
import pekko.actor.typed.scaladsl.Behaviors
import pekko.util.Timeout
2017-10-30 03:13:14 +02:00
import scala.concurrent._
import scala.concurrent.duration._
2023-01-04 10:48:08 +01:00
import scala.language.postfixOps
implicit val timeout = Timeout(5 seconds)
2019-04-19 07:53:27 +01:00
""")
2020-03-24 07:59:33 +01:00
.enablePlugins(Jdk9)
2017-10-30 03:13:14 +02:00
2023-01-05 11:10:50 +01:00
lazy val persistenceTyped = pekkoModule("persistence-typed")
2017-12-18 14:50:46 +00:00
.dependsOn(
actorTyped,
2020-06-22 12:46:57 +01:00
streamTyped,
2020-07-16 20:56:57 +01:00
remote,
2018-05-25 10:23:04 +01:00
persistence % "compile->compile;test->test",
2020-06-22 12:46:57 +01:00
persistenceQuery,
2020-03-12 15:37:16 +01:00
actorTestkitTyped % "test->test",
clusterTyped % "test->test",
2019-09-30 19:03:22 +02:00
actorTestkitTyped % "test->test",
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
2019-07-11 14:04:24 +02:00
jackson % "test->test")
.settings(javacOptions += "-parameters") // for Jackson
2018-05-03 06:30:00 -05:00
.settings(Dependencies.persistenceShared)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.persistence.typed"))
2023-06-21 12:20:54 +01:00
.settings(AddMetaInfLicenseFiles.persistenceTypedSettings)
2020-07-16 20:56:57 +01:00
.settings(Protobuf.settings)
// To be able to import ContainerFormats.proto
2023-01-23 11:09:03 +00:00
.settings(Protobuf.importPath := Some(baseDirectory.value / ".." / "remote" / "src" / "main" / "protobuf"))
2018-11-12 20:10:20 +01:00
.settings(OSGi.persistenceTyped)
2017-09-22 12:17:04 +02:00
2023-01-05 11:10:50 +01:00
lazy val clusterTyped = pekkoModule("cluster-typed")
2017-09-22 12:17:04 +02:00
.dependsOn(
2017-12-18 14:50:46 +00:00
actorTyped,
2018-07-03 09:03:13 +01:00
cluster % "compile->compile;test->test;multi-jvm->multi-jvm",
2017-09-21 17:58:29 +02:00
clusterTools,
2017-12-18 14:50:46 +00:00
distributedData,
2018-05-15 19:38:43 +02:00
actorTestkitTyped % "test->test",
2018-04-27 12:44:44 +01:00
actorTypedTests % "test->test",
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
2019-07-11 14:04:24 +02:00
remoteTests % "test->test",
jackson % "test->test")
2020-03-12 15:37:16 +01:00
.settings(Protobuf.settings)
// To be able to import ContainerFormats.proto
2023-01-23 11:09:03 +00:00
.settings(Protobuf.importPath := Some(baseDirectory.value / ".." / "remote" / "src" / "main" / "protobuf"))
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.cluster.typed"))
2020-03-10 15:01:19 +01:00
.settings(Protobuf.settings)
// To be able to import ContainerFormats.proto
2023-01-23 11:09:03 +00:00
.settings(Protobuf.importPath := Some(baseDirectory.value / ".." / "remote" / "src" / "main" / "protobuf"))
2018-04-27 12:44:44 +01:00
.configs(MultiJvm)
.enablePlugins(MultiNodeScalaTest)
2017-12-18 14:50:46 +00:00
2023-01-05 11:10:50 +01:00
lazy val clusterShardingTyped = pekkoModule("cluster-sharding-typed")
2017-12-18 14:50:46 +00:00
.dependsOn(
2020-03-24 07:59:33 +01:00
actorTyped % "compile->CompileJdk9",
2018-04-27 12:44:44 +01:00
clusterTyped % "compile->compile;test->test;multi-jvm->multi-jvm",
2020-05-28 08:35:27 +01:00
clusterSharding % "compile->compile;compile->CompileJdk9;multi-jvm->multi-jvm",
2018-05-15 19:38:43 +02:00
actorTestkitTyped % "test->test",
2018-01-22 13:47:18 +00:00
actorTypedTests % "test->test",
2020-06-29 08:06:59 +02:00
persistenceTyped % "optional->compile;test->test",
2020-04-29 22:06:42 +02:00
persistenceTestkit % "test->test",
2020-03-24 07:59:33 +01:00
remote % "compile->CompileJdk9;test->test",
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
2019-07-11 14:04:24 +02:00
remoteTests % "test->test",
2020-03-22 20:25:33 +01:00
remoteTests % "test->test;multi-jvm->multi-jvm",
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
from akka-remote to akka-actor since they had no dependency
and are useful also in local systems, e.g. persistence.
* e.g. needed for persistence-tck
* less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
but misconfigured
* Made tests pass
* allow-java-serialization=on in akka-persistence
* allow-java-serialization=on in classic remoting tests
* JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
* Boolean
* java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
* Effect() is factory in EventSourcedBehavior class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
* fallback to akka.remote.serialization.ThrowableNotSerializableException
if exception is not serializable when wrapped in system messages from
remote deployed child actors and Status.Failure messages
* it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
improving or removing that feature
* migration guide, including description of rolling update
* fix 2.13 compiler error
* minor review feedback
2019-07-11 14:04:24 +02:00
jackson % "test->test")
.settings(javacOptions += "-parameters") // for Jackson
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.cluster.sharding.typed"))
2017-12-18 14:50:46 +00:00
// To be able to import ContainerFormats.proto
2020-03-10 18:04:09 +01:00
.settings(Protobuf.settings)
2023-01-23 11:09:03 +00:00
.settings(Protobuf.importPath := Some(baseDirectory.value / ".." / "remote" / "src" / "main" / "protobuf"))
2018-04-27 12:44:44 +01:00
.configs(MultiJvm)
.enablePlugins(MultiNodeScalaTest)
2017-12-18 14:50:46 +00:00
2023-01-05 11:10:50 +01:00
lazy val streamTyped = pekkoModule("stream-typed")
2017-09-07 21:07:41 +02:00
.dependsOn(
actorTyped,
stream,
2018-05-07 19:23:30 +09:00
streamTestkit % "test->test",
2018-05-15 19:38:43 +02:00
actorTestkitTyped % "test->test",
2019-04-19 07:53:27 +01:00
actorTypedTests % "test->test")
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.stream.typed"))
2018-01-19 19:22:40 +07:00
.enablePlugins(ScaladocNoVerificationOfDiagrams)
2017-12-18 14:50:46 +00:00
2023-01-05 11:10:50 +01:00
lazy val actorTestkitTyped = pekkoModule("actor-testkit-typed")
2019-09-09 05:25:33 -07:00
.dependsOn(actorTyped, slf4j, testkit % "compile->compile;test->test")
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.actor.testkit.typed"))
2018-05-15 19:38:43 +02:00
.settings(Dependencies.actorTestkitTyped)
2017-12-18 14:50:46 +00:00
2023-01-05 11:10:50 +01:00
lazy val actorTypedTests = pekkoModule("actor-typed-tests")
2022-03-13 08:46:08 +01:00
.dependsOn(actorTyped % "compile->CompileJdk9", actorTestkitTyped % "compile->compile;test->test", actor)
2022-12-02 14:49:16 +01:00
.settings(PekkoBuild.mayChangeSettings)
2017-10-30 03:13:14 +02:00
.disablePlugins(MimaPlugin)
2017-12-11 11:18:43 +01:00
.enablePlugins(NoPublish)
2017-05-22 15:56:57 +02:00
2023-01-05 11:10:50 +01:00
lazy val discovery = pekkoModule("discovery")
2019-04-19 07:53:27 +01:00
.dependsOn(actor, testkit % "test->test", actorTests % "test->test")
2018-12-05 13:01:24 +00:00
.settings(Dependencies.discovery)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.discovery"))
2018-12-05 13:01:24 +00:00
.settings(OSGi.discovery)
2017-05-16 22:03:18 +02:00
2023-01-05 11:10:50 +01:00
lazy val coordination = pekkoModule("coordination")
2020-05-25 12:21:13 +02:00
.dependsOn(actor, testkit % "test->test", actorTests % "test->test")
2019-03-28 13:24:46 +01:00
.settings(Dependencies.coordination)
2023-01-05 11:10:50 +01:00
.settings(AutomaticModuleName.settings("pekko.coordination"))
2019-03-28 13:24:46 +01:00
.settings(OSGi.coordination)
2023-01-05 11:10:50 +01:00
lazy val billOfMaterials = Project("bill-of-materials", file("bill-of-materials"))
2020-11-30 16:39:14 +01:00
.enablePlugins(BillOfMaterialsPlugin)
2022-12-02 14:49:16 +01:00
.disablePlugins(MimaPlugin, PekkoDisciplinePlugin)
2020-11-30 16:39:14 +01:00
// buildSettings and defaultSettings configure organization name, licenses, etc...
2022-12-02 14:49:16 +01:00
.settings(PekkoBuild.defaultSettings)
2020-11-30 16:39:14 +01:00
.settings(
2023-01-05 11:10:50 +01:00
name := "pekko-bom",
2020-11-30 16:39:14 +01:00
bomIncludeProjects := userProjects,
description := s"${description.value} (depending on Scala ${CrossVersion.binaryScalaVersion(scalaVersion.value)})")
2021-02-01 15:38:29 +00:00
lazy val serialversionRemoverPlugin =
Project(id = "serialVersionRemoverPlugin", base = file("plugins/serialversion-remover-plugin")).settings(
2022-11-12 10:21:24 +01:00
scalaVersion := Dependencies.scala3Version,
libraryDependencies += ("org.scala-lang" %% "scala3-compiler" % Dependencies.scala3Version),
2021-02-01 15:38:29 +00:00
Compile / doc / sources := Nil,
2021-05-25 12:50:51 +02:00
Compile / publishArtifact := false)
2021-02-01 15:38:29 +00:00
2021-10-25 08:18:22 +02:00
lazy val serialversionRemoverPluginSettings = Seq(
Compile / scalacOptions ++= (
if (scalaVersion.value.startsWith("3."))
Seq("-Xplugin:" + (serialversionRemoverPlugin / Compile / Keys.`package`).value.getAbsolutePath.toString)
else Nil
))
2021-02-01 15:38:29 +00:00
2023-01-05 11:10:50 +01:00
def pekkoModule(moduleName: String): Project =
Project(id = moduleName, base = file(moduleName))
2019-03-18 17:12:21 +01:00
.enablePlugins(ReproducibleBuildsPlugin)
2022-04-21 21:50:07 +08:00
.disablePlugins(WelcomePlugin)
2022-12-02 14:49:16 +01:00
.settings(PekkoBuild.defaultSettings)
2023-01-05 11:10:50 +01:00
.settings(
name := s"pekko-$moduleName")
2017-10-30 03:13:14 +02:00
.enablePlugins(BootstrapGenjavadoc)
2019-02-15 10:44:03 -08:00
/* Command aliases one can run locally against a module
- where three or more tasks should be checked for faster turnaround
- to avoid another push and CI cycle should mima or paradox fail.
- the assumption is the user has already run tests, hence the test:compile. */
def commandValue(p: Project, externalTest: Option[Project] = None) = {
val test = externalTest.getOrElse(p)
val optionalMima = if (p.id.endsWith("-typed")) "" else s";${p.id}/mimaReportBinaryIssues"
2019-02-09 14:21:16 +01:00
val optionalExternalTestFormat = externalTest.map(t => s";${t.id}/scalafmtAll").getOrElse("")
2019-03-12 11:43:02 +00:00
s";${p.id}/scalafmtAll$optionalExternalTestFormat;${test.id}/test:compile$optionalMima;${docs.id}/paradox;${test.id}:validateCompile"
2019-02-15 10:44:03 -08:00
}
addCommandAlias("allActor", commandValue(actor, Some(actorTests)))
addCommandAlias("allRemote", commandValue(remote, Some(remoteTests)))
2019-02-21 14:12:55 +00:00
addCommandAlias("allClusterCore", commandValue(cluster))
addCommandAlias("allClusterMetrics", commandValue(clusterMetrics))
2019-02-15 10:44:03 -08:00
addCommandAlias("allClusterSharding", commandValue(clusterSharding))
2019-02-21 14:12:55 +00:00
addCommandAlias("allClusterTools", commandValue(clusterTools))
2019-04-19 07:53:27 +01:00
addCommandAlias(
"allCluster",
Seq(commandValue(cluster), commandValue(distributedData), commandValue(clusterSharding),
commandValue(clusterTools)).mkString)
2019-03-28 13:24:46 +01:00
addCommandAlias("allCoordination", commandValue(coordination))
addCommandAlias("allDistributedData", commandValue(distributedData))
2019-02-15 10:44:03 -08:00
addCommandAlias("allPersistence", commandValue(persistence))
addCommandAlias("allStream", commandValue(stream, Some(streamTests)))
addCommandAlias("allDiscovery", commandValue(discovery))
2019-04-19 07:53:27 +01:00
addCommandAlias(
"allTyped",
Seq(
commandValue(actorTyped, Some(actorTypedTests)),
commandValue(actorTestkitTyped),
commandValue(clusterTyped),
commandValue(clusterShardingTyped),
commandValue(persistenceTyped),
commandValue(streamTyped)).mkString)