2023-01-08 17:13:31 +08: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-01-08 17:13:31 +08:00
|
|
|
*/
|
|
|
|
|
|
2019-01-02 18:55:26 +08:00
|
|
|
/*
|
2022-02-04 12:36:44 +01:00
|
|
|
* Copyright (C) 2016-2022 Lightbend Inc. <https://www.lightbend.com>
|
2016-02-23 12:58:39 +01:00
|
|
|
*/
|
2018-03-13 23:45:55 +09:00
|
|
|
|
2014-05-07 14:49:35 +02:00
|
|
|
import sbt._
|
2015-05-21 21:07:37 +02:00
|
|
|
import Keys._
|
2020-04-07 00:40:55 +07:00
|
|
|
import scala.language.implicitConversions
|
2014-05-07 14:49:35 +02:00
|
|
|
|
|
|
|
|
object Dependencies {
|
2016-01-12 13:45:18 +01:00
|
|
|
import DependencyHelpers._
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2024-03-19 11:28:28 +01:00
|
|
|
object Protobuf {
|
2025-01-27 11:26:18 +01:00
|
|
|
// https://protobuf.dev/support/version-support/
|
2025-04-17 23:10:33 +02:00
|
|
|
// protobuf-java 4.29 corresponds with protoc 29.x
|
2025-08-17 02:10:07 +01:00
|
|
|
val protobufJavaVersion = "4.32.0"
|
2025-08-20 08:21:18 +01:00
|
|
|
val protocVersion = "32.0"
|
2024-03-19 11:28:28 +01:00
|
|
|
}
|
|
|
|
|
|
2016-04-13 17:33:32 +02:00
|
|
|
lazy val java8CompatVersion = settingKey[String]("The version of scala-java8-compat to use.")
|
2021-05-25 12:50:51 +02:00
|
|
|
.withRank(KeyRanks.Invisible) // avoid 'unused key' warning
|
2019-06-18 15:21:26 +01:00
|
|
|
|
2021-03-30 23:29:37 +02:00
|
|
|
val junitVersion = "4.13.2"
|
2025-07-22 14:50:34 +08:00
|
|
|
val junit5Version = "5.13.4"
|
2025-02-27 13:26:11 +01:00
|
|
|
val slf4jVersion = "2.0.17"
|
2019-05-29 09:50:28 +01:00
|
|
|
// check agrona version when updating this
|
2025-08-10 13:30:43 +08:00
|
|
|
val aeronVersion = "1.48.6"
|
2019-11-29 12:35:19 +01:00
|
|
|
// needs to be inline with the aeron version, check
|
2025-07-30 18:23:41 +01:00
|
|
|
// https://github.com/aeron-io/aeron/blob/master/gradle/libs.versions.toml
|
|
|
|
|
val agronaVersion = "2.2.4"
|
2025-09-04 00:37:40 +08:00
|
|
|
val nettyVersion = "4.2.5.Final"
|
2025-07-30 15:38:53 +02:00
|
|
|
val logbackVersion = "1.5.18"
|
2018-02-11 19:56:52 +01:00
|
|
|
|
2025-08-31 13:56:55 +08:00
|
|
|
val jacksonAnnotationsVersion = "2.20"
|
|
|
|
|
val jacksonCoreVersion = "2.20.0"
|
2023-04-05 13:44:58 +00:00
|
|
|
val jacksonDatabindVersion = jacksonCoreVersion
|
2022-04-08 08:17:14 +02:00
|
|
|
|
2024-09-07 23:18:41 +01:00
|
|
|
val scala212Version = "2.12.20"
|
2025-01-11 04:44:48 +08:00
|
|
|
val scala213Version = "2.13.16"
|
2025-05-08 00:56:24 +08:00
|
|
|
val scala3Version = "3.3.6"
|
2021-12-14 11:00:02 +01:00
|
|
|
val allScalaVersions = Seq(scala213Version, scala212Version, scala3Version)
|
2014-09-16 10:53:04 +02:00
|
|
|
|
2023-03-24 00:46:48 +08:00
|
|
|
val reactiveStreamsVersion = "1.0.4"
|
2019-08-27 11:20:37 +02:00
|
|
|
|
2024-06-30 08:36:53 +01:00
|
|
|
val scalaTestVersion = "3.2.19"
|
|
|
|
|
val scalaTestScalaCheckVersion = "1-18"
|
|
|
|
|
val scalaCheckVersion = "1.18.0"
|
2020-03-03 11:51:07 +01:00
|
|
|
|
2020-08-18 07:46:06 +01:00
|
|
|
val Versions =
|
2021-12-14 11:00:02 +01:00
|
|
|
Seq(crossScalaVersions := allScalaVersions, scalaVersion := allScalaVersions.head,
|
2023-04-04 16:22:58 +02:00
|
|
|
java8CompatVersion := "1.0.2")
|
2014-05-07 14:49:35 +02:00
|
|
|
|
|
|
|
|
object Compile {
|
|
|
|
|
// Compile
|
2015-06-08 12:26:19 +02:00
|
|
|
|
2025-07-11 20:28:12 +01:00
|
|
|
val config = "com.typesafe" % "config" % "1.4.4"
|
2023-09-16 02:24:28 +08:00
|
|
|
val `netty-transport` = "io.netty" % "netty-transport" % nettyVersion
|
|
|
|
|
val `netty-handler` = "io.netty" % "netty-handler" % nettyVersion
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2023-07-15 21:39:02 +08:00
|
|
|
val scalaReflect: ScalaVersionDependentModuleID =
|
|
|
|
|
ScalaVersionDependentModuleID.versioned("org.scala-lang" % "scala-reflect" % _)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2023-04-21 16:20:42 +02:00
|
|
|
val slf4jApi = "org.slf4j" % "slf4j-api" % slf4jVersion
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2019-09-09 21:54:09 +09:00
|
|
|
// mirrored in OSGi sample https://github.com/akka/akka-samples/tree/2.6/akka-sample-osgi-dining-hakkers
|
2023-04-21 16:20:42 +02:00
|
|
|
val osgiCore = "org.osgi" % "org.osgi.core" % "6.0.0"
|
|
|
|
|
val osgiCompendium = "org.osgi" % "org.osgi.compendium" % "5.0.0"
|
2015-03-06 11:58:51 -06:00
|
|
|
|
2023-04-21 16:20:42 +02:00
|
|
|
val sigar = "org.fusesource" % "sigar" % "1.6.4"
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2024-06-02 11:04:24 +08:00
|
|
|
val jctools = "org.jctools" % "jctools-core" % "4.0.5"
|
2018-03-21 14:33:49 +01:00
|
|
|
|
2016-01-12 13:45:18 +01:00
|
|
|
// reactive streams
|
2023-04-21 16:20:42 +02:00
|
|
|
val reactiveStreams = "org.reactivestreams" % "reactive-streams" % reactiveStreamsVersion
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2025-02-23 14:31:12 +08:00
|
|
|
val lmdb = "org.lmdbjava" % "lmdbjava" % "0.9.1"
|
2017-02-23 14:17:13 +00:00
|
|
|
|
2023-04-21 16:20:42 +02:00
|
|
|
val junit = "junit" % "junit" % junitVersion
|
2023-11-10 11:51:55 +01:00
|
|
|
val junit5 = "org.junit.jupiter" % "junit-jupiter-engine" % junit5Version
|
2016-01-14 11:25:56 +01:00
|
|
|
|
|
|
|
|
// For Java 8 Conversions
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val java8Compat = Def.setting {
|
2022-03-04 17:23:08 +01:00
|
|
|
"org.scala-lang.modules" %% "scala-java8-compat" % java8CompatVersion.value
|
2023-04-21 16:20:42 +02:00
|
|
|
}
|
2017-02-23 14:17:13 +00:00
|
|
|
|
2023-04-21 16:20:42 +02:00
|
|
|
val aeronDriver = "io.aeron" % "aeron-driver" % aeronVersion
|
|
|
|
|
val aeronClient = "io.aeron" % "aeron-client" % aeronVersion
|
2019-05-29 09:50:28 +01:00
|
|
|
// Added explicitly for when artery tcp is used
|
2023-04-21 16:20:42 +02:00
|
|
|
val agrona = "org.agrona" % "agrona" % agronaVersion
|
2018-08-01 16:13:03 +01:00
|
|
|
|
2023-10-15 02:33:04 +01:00
|
|
|
val asnOne = ("com.hierynomus" % "asn-one" % "0.6.0").exclude("org.slf4j", "slf4j-api")
|
2020-05-17 00:09:24 +02:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
val jacksonCore = "com.fasterxml.jackson.core" % "jackson-core" % jacksonCoreVersion
|
2025-08-31 13:56:55 +08:00
|
|
|
val jacksonAnnotations = "com.fasterxml.jackson.core" % "jackson-annotations" % jacksonAnnotationsVersion
|
2024-01-22 07:15:16 +01:00
|
|
|
val jacksonDatabind = "com.fasterxml.jackson.core" % "jackson-databind" % jacksonDatabindVersion
|
|
|
|
|
val jacksonJdk8 = "com.fasterxml.jackson.datatype" % "jackson-datatype-jdk8" % jacksonCoreVersion
|
|
|
|
|
val jacksonJsr310 = "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % jacksonCoreVersion
|
2024-12-28 14:01:10 +01:00
|
|
|
val jacksonScala = ("com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonCoreVersion)
|
|
|
|
|
.excludeAll(ExclusionRule(organization = "org.scala-lang"))
|
2024-01-22 07:15:16 +01:00
|
|
|
val jacksonParameterNames = "com.fasterxml.jackson.module" % "jackson-module-parameter-names" % jacksonCoreVersion
|
|
|
|
|
val jacksonCbor = "com.fasterxml.jackson.dataformat" % "jackson-dataformat-cbor" % jacksonCoreVersion
|
2023-04-21 16:20:42 +02:00
|
|
|
val lz4Java = "org.lz4" % "lz4-java" % "1.8.0"
|
2018-02-11 19:56:52 +01:00
|
|
|
|
2023-04-21 16:20:42 +02:00
|
|
|
val logback = "ch.qos.logback" % "logback-classic" % logbackVersion
|
2019-08-24 08:46:39 +02:00
|
|
|
|
2015-05-29 18:20:51 +02:00
|
|
|
object Docs {
|
2021-12-23 18:28:30 +05:30
|
|
|
val sprayJson = "io.spray" %% "spray-json" % "1.3.6" % Test
|
2025-04-27 11:34:26 +08:00
|
|
|
val gson = "com.google.code.gson" % "gson" % "2.13.1" % Test
|
2015-05-29 18:20:51 +02:00
|
|
|
}
|
|
|
|
|
|
2021-12-23 18:28:30 +05:30
|
|
|
object TestDependencies {
|
2025-07-20 08:46:15 +01:00
|
|
|
val commonsIo = "commons-io" % "commons-io" % "2.20.0" % Test
|
2025-07-27 08:27:16 +01:00
|
|
|
val commonsCodec = "commons-codec" % "commons-codec" % "1.19.0" % Test
|
2023-06-13 11:56:03 +01:00
|
|
|
val junit = "junit" % "junit" % junitVersion % Test
|
2023-11-10 11:51:55 +01:00
|
|
|
val junit5 = "org.junit.jupiter" % "junit-jupiter-engine" % junit5Version % Test
|
2023-06-13 11:56:03 +01:00
|
|
|
val httpClient = "org.apache.httpcomponents" % "httpclient" % "4.5.14" % Test
|
|
|
|
|
|
2023-04-21 16:20:42 +02:00
|
|
|
val logback = Compile.logback % Test
|
2020-03-03 11:51:07 +01:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
val scalatest = "org.scalatest" %% "scalatest" % scalaTestVersion % Test
|
2020-03-03 11:51:07 +01:00
|
|
|
|
|
|
|
|
// The 'scalaTestPlus' projects are independently versioned,
|
|
|
|
|
// but the version of each module starts with the scalatest
|
|
|
|
|
// version it was intended to work with
|
2024-01-22 07:15:16 +01:00
|
|
|
val scalatestJUnit = "org.scalatestplus" %% "junit-4-13" % (scalaTestVersion + ".0") % Test
|
2024-02-12 13:20:28 +01:00
|
|
|
val scalatestTestNG = "org.scalatestplus" %% "testng-7-5" % "3.2.17.0" % Test
|
2024-01-22 07:15:16 +01:00
|
|
|
val scalatestScalaCheck =
|
2023-06-13 22:44:13 +02:00
|
|
|
"org.scalatestplus" %% s"scalacheck-$scalaTestScalaCheckVersion" % (scalaTestVersion + ".0") % Test
|
2024-02-12 13:20:28 +01:00
|
|
|
// https://github.com/scalatest/scalatest/issues/2311
|
2024-02-27 14:23:25 +01:00
|
|
|
val scalatestMockito = "org.scalatestplus" %% "mockito-4-11" % "3.2.18.0" % Test
|
2020-03-03 11:51:07 +01:00
|
|
|
|
2023-04-21 16:20:42 +02:00
|
|
|
val pojosr = "com.googlecode.pojosr" % "de.kalpatec.pojosr.framework" % "0.2.1" % Test
|
2025-03-16 10:52:41 +01:00
|
|
|
val tinybundles = "org.ops4j.pax.tinybundles" % "tinybundles" % "4.0.1" % Test
|
2024-12-08 22:57:32 +08:00
|
|
|
val bndlib = "biz.aQute.bnd" % "biz.aQute.bndlib" % "6.4.1" % Test
|
2024-12-17 01:55:54 +01:00
|
|
|
val `pax-exam` = "org.ops4j.pax.exam" % "pax-exam" % "4.14.0" % Test
|
|
|
|
|
val `pax-exam-cm` = "org.ops4j.pax.exam" % "pax-exam-cm" % "4.14.0" % Test
|
|
|
|
|
val `pax-exam-container-forked` = "org.ops4j.pax.exam" % "pax-exam-container-forked" % "4.14.0" % Test
|
=act,tes Initial draft of internal MetricsKit
Note: This is NOT aimed to provide an micro-benchmarking solution.
The goal is to provide data for broad trend analysis. For techniques
that fight the inliner and other specialised techniques, refer to JMH.
+ custom console and graphite reporters
- had to be custom because it's not possible to add custom metric
types to the existing reporters
+ initial hdr.Histogram histogram() provider, see
http://latencyutils.github.io/LatencyUtils/
+ Not using timers provided by Metrics, instead use the above histogram
+ Added average Actor size measurement
+ Measuring the "blocking time" when an actor is created, before we fire
of the async part of this process; Measures in loop and will fluctuate
a lot. Times are in `us` -- System.nanoTime should provide good enough
resolution.
+ Measuring total actor creation time by using
`KnownOpsInTimespanTimer`, which given a known number of ops, in a
large amount of time, roughtly estimates time per one operation.
// Yes, we are aware of the possibility of GC pauses and other horrors
+ All classes are `private[akka]`, we should not encourage people to use
this yet
+ Counters use Java 8's `LongAdder`, which is metric's private;
The new trend in Java land will be copy paste-ing this class ;)
+ Metrics are logged to Graphite, so we can long-term analyse these
+ Reporters are configurable using typesafe-config
! I'm not very happy about how I work around Metrics not being too open
for adding additional custom metrics. Seems like a hack at places.
I will consider removing the Metrics dependency all together.
numbers
Example output:
```
-- KnownOpsInTimespanTimer-------------------------------------------
actor-creation.total.creating-100000-actors.Props|new-EmptyArgsActor|…||-same
ops = 100000
time = 1.969 s
ops/s = 50782.22
avg = 19.69 μs
-- AveragingGauge---------------------------------------------------
actor-creation.Props|new-EmptyArgsActor|…||-same.avg-mem-per-actor
avg = 439.67
```
2014-04-29 10:50:36 +02:00
|
|
|
|
2016-08-29 16:33:33 +02:00
|
|
|
// in-memory filesystem for file related tests
|
2025-07-12 19:23:29 +01:00
|
|
|
val jimfs = "com.google.jimfs" % "jimfs" % "1.3.1" % Test
|
2016-08-29 16:33:33 +02:00
|
|
|
|
2025-08-22 08:14:33 +01:00
|
|
|
val dockerClientVersion = "3.6.0"
|
2024-01-22 07:15:16 +01:00
|
|
|
val dockerClient = Seq(
|
2024-03-06 15:39:57 +01:00
|
|
|
"com.github.docker-java" % "docker-java-core" % dockerClientVersion % Test,
|
chore: dependency-submission: skip test scope (#1392)
Currently, dependency-submission would submit all dependencies to
https://github.com/apache/pekko/security/dependabot , including
test dependencies. We then added explicit dependencies to the build
to squash warnings about outdated test dependencies (#1181, #1313
and #1344).
With version 3, sbt-dependency-submission now supports ignoring
scopes. This PR proposes to ignore the test scope, and remove the
explicit dependencies from the build.
Of course, we want our developers to be secure as much as our users.
From that perspective you could say we'd want to remove 'insecure'
dependencies even from the test scope. In practice, however, I think
it's really unlikely that a vulnerability in a test scope dependency
would lead to a realistic attack on a developer. For that reason, I
think ignoring this scope for dependency-submission and keeping the
old dependencies in the build removes some development friction, which
balances out the risk of testing with outdated dependencies. If there'd
be a 'malicious' dependency out there, I expect we'd learn about it
through other channels.
2025-01-06 12:11:33 +01:00
|
|
|
"com.github.docker-java" % "docker-java-transport-httpclient5" % dockerClientVersion % Test)
|
2024-01-22 07:15:16 +01:00
|
|
|
|
|
|
|
|
val jackson = Seq(
|
2024-05-26 09:47:29 +01:00
|
|
|
jacksonCore % Test,
|
|
|
|
|
jacksonAnnotations % Test,
|
|
|
|
|
jacksonDatabind % Test,
|
|
|
|
|
"com.fasterxml.jackson.jaxrs" % "jackson-jaxrs-base" % jacksonCoreVersion % Test,
|
|
|
|
|
"com.fasterxml.jackson.jaxrs" % "jackson-jaxrs-json-provider" % jacksonCoreVersion % Test,
|
|
|
|
|
"com.fasterxml.jackson.datatype" % "jackson-datatype-guava" % jacksonCoreVersion % Test)
|
2023-06-12 12:48:28 +02:00
|
|
|
|
=act,tes Initial draft of internal MetricsKit
Note: This is NOT aimed to provide an micro-benchmarking solution.
The goal is to provide data for broad trend analysis. For techniques
that fight the inliner and other specialised techniques, refer to JMH.
+ custom console and graphite reporters
- had to be custom because it's not possible to add custom metric
types to the existing reporters
+ initial hdr.Histogram histogram() provider, see
http://latencyutils.github.io/LatencyUtils/
+ Not using timers provided by Metrics, instead use the above histogram
+ Added average Actor size measurement
+ Measuring the "blocking time" when an actor is created, before we fire
of the async part of this process; Measures in loop and will fluctuate
a lot. Times are in `us` -- System.nanoTime should provide good enough
resolution.
+ Measuring total actor creation time by using
`KnownOpsInTimespanTimer`, which given a known number of ops, in a
large amount of time, roughtly estimates time per one operation.
// Yes, we are aware of the possibility of GC pauses and other horrors
+ All classes are `private[akka]`, we should not encourage people to use
this yet
+ Counters use Java 8's `LongAdder`, which is metric's private;
The new trend in Java land will be copy paste-ing this class ;)
+ Metrics are logged to Graphite, so we can long-term analyse these
+ Reporters are configurable using typesafe-config
! I'm not very happy about how I work around Metrics not being too open
for adding additional custom metrics. Seems like a hack at places.
I will consider removing the Metrics dependency all together.
numbers
Example output:
```
-- KnownOpsInTimespanTimer-------------------------------------------
actor-creation.total.creating-100000-actors.Props|new-EmptyArgsActor|…||-same
ops = 100000
time = 1.969 s
ops/s = 50782.22
avg = 19.69 μs
-- AveragingGauge---------------------------------------------------
actor-creation.Props|new-EmptyArgsActor|…||-same.avg-mem-per-actor
avg = 439.67
```
2014-04-29 10:50:36 +02:00
|
|
|
// metrics, measurements, perf testing
|
2025-09-04 00:37:25 +08:00
|
|
|
val metrics = "io.dropwizard.metrics" % "metrics-core" % "4.2.36" % Test
|
|
|
|
|
val metricsJvm = "io.dropwizard.metrics" % "metrics-jvm" % "4.2.36" % Test
|
2023-04-21 16:20:42 +02:00
|
|
|
val latencyUtils = "org.latencyutils" % "LatencyUtils" % "2.0.3" % Test
|
2024-06-02 11:05:04 +08:00
|
|
|
val hdrHistogram = "org.hdrhistogram" % "HdrHistogram" % "2.2.2" % Test
|
2017-10-06 10:30:28 +02:00
|
|
|
val metricsAll = Seq(metrics, metricsJvm, latencyUtils, hdrHistogram)
|
2014-12-12 11:49:32 -06:00
|
|
|
|
|
|
|
|
// sigar logging
|
2023-04-21 16:20:42 +02:00
|
|
|
val slf4jJul = "org.slf4j" % "jul-to-slf4j" % slf4jVersion % Test
|
|
|
|
|
val slf4jLog4j = "org.slf4j" % "log4j-over-slf4j" % slf4jVersion % Test
|
2016-01-12 13:45:18 +01:00
|
|
|
|
|
|
|
|
// reactive streams tck
|
2023-03-24 00:46:48 +08:00
|
|
|
val reactiveStreamsTck = ("org.reactivestreams" % "reactive-streams-tck" % reactiveStreamsVersion % Test)
|
2023-04-21 16:20:42 +02:00
|
|
|
.exclude("org.testng", "testng")
|
2019-07-23 15:22:07 +01:00
|
|
|
|
2024-03-19 11:28:28 +01:00
|
|
|
val protobufRuntime = "com.google.protobuf" % "protobuf-java" % Protobuf.protobufJavaVersion % Test
|
2021-11-17 01:00:05 +13:00
|
|
|
|
|
|
|
|
// YCSB (Yahoo Cloud Serving Benchmark https://ycsb.site)
|
2023-04-21 16:20:42 +02:00
|
|
|
val ycsb = "site.ycsb" % "core" % "0.17.0" % Test
|
2014-12-12 11:49:32 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
object Provided {
|
|
|
|
|
// TODO remove from "test" config
|
2023-10-16 10:05:11 +01:00
|
|
|
val sigarLoader = "io.kamon" % "sigar-loader" % "1.6.6" % "optional;provided;test"
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2018-08-01 16:13:03 +01:00
|
|
|
val activation = "com.sun.activation" % "javax.activation" % "1.2.0" % "provided;test"
|
|
|
|
|
|
2023-04-21 16:20:42 +02:00
|
|
|
val levelDB = "org.iq80.leveldb" % "leveldb" % "0.12" % "optional;provided"
|
|
|
|
|
val levelDBmultiJVM = "org.iq80.leveldb" % "leveldb" % "0.12" % "optional;provided;multi-jvm;test"
|
|
|
|
|
val levelDBNative = "org.fusesource.leveldbjni" % "leveldbjni-all" % "1.8" % "optional;provided"
|
2018-02-22 12:25:04 +01:00
|
|
|
|
|
|
|
|
val junit = Compile.junit % "optional;provided;test"
|
2023-11-10 11:51:55 +01:00
|
|
|
val junit5 = Compile.junit5 % "optional;provided;test"
|
2018-08-01 16:13:03 +01:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
val scalatest = "org.scalatest" %% "scalatest" % scalaTestVersion % "optional;provided;test"
|
2018-09-07 16:08:24 +02:00
|
|
|
|
2023-04-21 16:20:42 +02:00
|
|
|
val logback = Compile.logback % "optional;provided;test"
|
2019-08-24 08:46:39 +02:00
|
|
|
|
2024-03-19 11:28:28 +01:00
|
|
|
val protobufRuntime = "com.google.protobuf" % "protobuf-java" % Protobuf.protobufJavaVersion % "optional;provided"
|
2020-04-27 11:15:10 +02:00
|
|
|
|
2014-05-07 14:49:35 +02:00
|
|
|
}
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2014-05-07 14:49:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
import Compile._
|
2016-01-12 13:45:18 +01:00
|
|
|
// TODO check if `l ++=` everywhere expensive?
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val l = libraryDependencies
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val actor = l ++= (CrossVersion.partialVersion(scalaVersion.value) match {
|
2023-04-04 16:22:58 +02:00
|
|
|
// java8-compat is only used in a couple of places for 2.13,
|
|
|
|
|
// it is probably possible to remove the dependency if needed.
|
|
|
|
|
case Some((2, n)) if n == 12 =>
|
2024-01-22 07:15:16 +01:00
|
|
|
List("org.scala-lang.modules" %% "scala-java8-compat" % java8CompatVersion.value)
|
2023-04-04 16:22:58 +02:00
|
|
|
case _ => List.empty
|
|
|
|
|
}) ++ Seq(config)
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2019-08-23 13:00:00 +01:00
|
|
|
val actorTyped = l ++= Seq(slf4jApi)
|
|
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
val discovery = l ++= Seq(TestDependencies.junit, TestDependencies.scalatest)
|
2019-03-28 13:24:46 +01:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
val coordination = l ++= Seq(TestDependencies.junit, TestDependencies.scalatest)
|
2018-12-05 13:01:24 +00:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
val testkit = l ++= Seq(TestDependencies.junit, TestDependencies.scalatest) ++ TestDependencies.metricsAll
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2024-01-12 22:06:01 +01:00
|
|
|
// TestDependencies.dockerClient brings in older versions of jackson libs that have CVEs
|
2018-10-16 15:35:55 +02:00
|
|
|
val actorTests = l ++= Seq(
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.junit,
|
2024-01-22 07:15:16 +01:00
|
|
|
TestDependencies.scalatest,
|
|
|
|
|
TestDependencies.scalatestJUnit,
|
|
|
|
|
TestDependencies.scalatestScalaCheck,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.commonsCodec,
|
2024-01-12 22:06:01 +01:00
|
|
|
TestDependencies.jimfs) ++
|
2024-01-22 07:15:16 +01:00
|
|
|
TestDependencies.jackson ++ TestDependencies.dockerClient
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val actorTestkitTyped = l ++= Seq(
|
2021-10-25 08:18:22 +02:00
|
|
|
Provided.logback,
|
|
|
|
|
Provided.junit,
|
2023-11-10 11:51:55 +01:00
|
|
|
Provided.junit5,
|
2024-01-22 07:15:16 +01:00
|
|
|
Provided.scalatest,
|
|
|
|
|
TestDependencies.scalatestJUnit)
|
2018-02-22 12:25:04 +01:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val pki = l ++=
|
2020-05-17 00:09:24 +02:00
|
|
|
Seq(
|
|
|
|
|
asnOne,
|
|
|
|
|
// pull up slf4j version from the one provided transitively in asnOne to fix unidoc
|
2020-06-05 17:34:44 +02:00
|
|
|
Compile.slf4jApi,
|
2024-01-22 07:15:16 +01:00
|
|
|
TestDependencies.scalatest)
|
2020-05-17 00:09:24 +02:00
|
|
|
|
2023-09-16 02:24:28 +08:00
|
|
|
val remoteDependencies = Seq(`netty-transport`, `netty-handler`, aeronDriver, aeronClient)
|
2019-05-29 09:50:28 +01:00
|
|
|
val remoteOptionalDependencies = remoteDependencies.map(_ % "optional")
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val remote = l ++= Seq(
|
2021-12-23 18:28:30 +05:30
|
|
|
agrona,
|
|
|
|
|
TestDependencies.junit,
|
2024-01-22 07:15:16 +01:00
|
|
|
TestDependencies.scalatest,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.jimfs,
|
|
|
|
|
TestDependencies.protobufRuntime) ++ remoteOptionalDependencies
|
2019-05-29 09:50:28 +01:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val remoteTests = l ++= Seq(TestDependencies.junit, TestDependencies.scalatest) ++ remoteDependencies
|
2019-05-29 09:50:28 +01:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val multiNodeTestkit = l ++= Seq(`netty-transport`, `netty-handler`)
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val cluster = l ++= Seq(TestDependencies.junit, TestDependencies.scalatest, TestDependencies.logback)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val clusterTools = l ++= Seq(TestDependencies.junit, TestDependencies.scalatest)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val clusterSharding = l ++= Seq(
|
2019-04-02 15:16:01 +02:00
|
|
|
Provided.levelDBmultiJVM,
|
|
|
|
|
Provided.levelDBNative,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.junit,
|
2024-01-22 07:15:16 +01:00
|
|
|
TestDependencies.scalatest,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.commonsIo,
|
|
|
|
|
TestDependencies.ycsb)
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val clusterMetrics = l ++= Seq(
|
2020-01-24 07:31:05 -08:00
|
|
|
Provided.sigarLoader,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.slf4jJul,
|
|
|
|
|
TestDependencies.slf4jLog4j,
|
|
|
|
|
TestDependencies.logback,
|
2024-01-22 07:15:16 +01:00
|
|
|
TestDependencies.scalatestMockito)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val distributedData = l ++= Seq(lmdb, TestDependencies.junit, TestDependencies.scalatest)
|
2014-07-08 18:30:15 +02:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val slf4j = l ++= Seq(slf4jApi, TestDependencies.logback)
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val persistence = l ++= Seq(
|
2019-04-02 15:16:01 +02:00
|
|
|
Provided.levelDB,
|
|
|
|
|
Provided.levelDBNative,
|
2024-01-22 07:15:16 +01:00
|
|
|
TestDependencies.scalatest,
|
|
|
|
|
TestDependencies.scalatestJUnit,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.junit,
|
|
|
|
|
TestDependencies.commonsIo,
|
|
|
|
|
TestDependencies.commonsCodec)
|
2019-04-02 15:16:01 +02:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val persistenceQuery = l ++= Seq(
|
|
|
|
|
TestDependencies.scalatest,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.junit,
|
|
|
|
|
TestDependencies.commonsIo,
|
2021-10-25 08:18:22 +02:00
|
|
|
Provided.levelDB,
|
|
|
|
|
Provided.levelDBNative)
|
2019-04-02 15:16:01 +02:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val persistenceTck = l ++= Seq(
|
|
|
|
|
TestDependencies.scalatest.withConfigurations(Some("compile")),
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.junit.withConfigurations(Some("compile")),
|
2019-04-02 15:16:01 +02:00
|
|
|
Provided.levelDB,
|
|
|
|
|
Provided.levelDBNative)
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val persistenceTestKit = l ++= Seq(TestDependencies.scalatest, TestDependencies.logback)
|
2020-03-20 22:18:43 +09:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val persistenceTypedTests = l ++= Seq(TestDependencies.scalatest, TestDependencies.logback)
|
2020-06-24 15:37:20 +01:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val persistenceShared = l ++= Seq(Provided.levelDB, Provided.levelDBNative, TestDependencies.logback)
|
2016-02-15 16:53:57 +01:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val jackson = l ++= Seq(
|
|
|
|
|
jacksonCore,
|
|
|
|
|
jacksonAnnotations,
|
|
|
|
|
jacksonDatabind,
|
|
|
|
|
jacksonJdk8,
|
|
|
|
|
jacksonJsr310,
|
|
|
|
|
jacksonParameterNames,
|
|
|
|
|
jacksonCbor,
|
|
|
|
|
jacksonScala,
|
2020-05-22 04:37:22 -07:00
|
|
|
lz4Java,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.junit,
|
2024-01-22 07:15:16 +01:00
|
|
|
TestDependencies.scalatest)
|
|
|
|
|
|
|
|
|
|
lazy val osgi = l ++= Seq(
|
2019-04-02 15:16:01 +02:00
|
|
|
osgiCore,
|
|
|
|
|
osgiCompendium,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.logback,
|
|
|
|
|
TestDependencies.commonsIo,
|
|
|
|
|
TestDependencies.pojosr,
|
|
|
|
|
TestDependencies.tinybundles,
|
2024-12-08 22:57:32 +08:00
|
|
|
TestDependencies.bndlib,
|
|
|
|
|
TestDependencies.`pax-exam`,
|
|
|
|
|
TestDependencies.`pax-exam-cm`,
|
|
|
|
|
TestDependencies.`pax-exam-container-forked`,
|
2024-01-22 07:15:16 +01:00
|
|
|
TestDependencies.scalatest,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.junit)
|
|
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val docs = l ++= Seq(
|
|
|
|
|
TestDependencies.scalatest,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.junit,
|
|
|
|
|
Docs.sprayJson,
|
|
|
|
|
Docs.gson,
|
|
|
|
|
Provided.levelDB)
|
2014-09-16 10:53:04 +02:00
|
|
|
|
2024-01-22 07:15:16 +01:00
|
|
|
lazy val benchJmh = l ++= Seq(logback, Provided.levelDB, Provided.levelDBNative, Compile.jctools)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2023-02-17 10:49:40 +01:00
|
|
|
// pekko stream
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2025-09-02 20:04:39 +01:00
|
|
|
lazy val stream = l ++= Seq[sbt.ModuleID](reactiveStreams, TestDependencies.scalatest)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2021-12-23 18:28:30 +05:30
|
|
|
lazy val streamTestkit = l ++= Seq(
|
2024-01-22 07:15:16 +01:00
|
|
|
TestDependencies.scalatest,
|
|
|
|
|
TestDependencies.scalatestScalaCheck,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.junit)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2021-10-25 08:18:22 +02:00
|
|
|
lazy val streamTests = l ++= Seq(
|
2024-01-22 07:15:16 +01:00
|
|
|
TestDependencies.scalatest,
|
|
|
|
|
TestDependencies.scalatestScalaCheck,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.junit,
|
|
|
|
|
TestDependencies.commonsIo,
|
|
|
|
|
TestDependencies.jimfs)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2020-01-24 07:31:05 -08:00
|
|
|
lazy val streamTestsTck = l ++= Seq(
|
2024-01-22 07:15:16 +01:00
|
|
|
TestDependencies.scalatest,
|
|
|
|
|
TestDependencies.scalatestTestNG,
|
|
|
|
|
TestDependencies.scalatestScalaCheck,
|
2021-12-23 18:28:30 +05:30
|
|
|
TestDependencies.junit,
|
|
|
|
|
TestDependencies.reactiveStreamsTck)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2014-09-16 10:53:04 +02:00
|
|
|
}
|
2016-01-12 13:45:18 +01:00
|
|
|
|
|
|
|
|
object DependencyHelpers {
|
2019-02-09 15:25:39 +01:00
|
|
|
case class ScalaVersionDependentModuleID(modules: String => Seq[ModuleID]) {
|
2016-01-12 13:45:18 +01:00
|
|
|
def %(config: String): ScalaVersionDependentModuleID =
|
2019-02-09 15:25:39 +01:00
|
|
|
ScalaVersionDependentModuleID(version => modules(version).map(_ % config))
|
2016-01-12 13:45:18 +01:00
|
|
|
}
|
|
|
|
|
object ScalaVersionDependentModuleID {
|
2019-02-09 15:25:39 +01:00
|
|
|
implicit def liftConstantModule(mod: ModuleID): ScalaVersionDependentModuleID = versioned(_ => mod)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2019-02-09 15:25:39 +01:00
|
|
|
def versioned(f: String => ModuleID): ScalaVersionDependentModuleID = ScalaVersionDependentModuleID(v => Seq(f(v)))
|
2016-01-12 13:45:18 +01:00
|
|
|
def fromPF(f: PartialFunction[String, ModuleID]): ScalaVersionDependentModuleID =
|
2019-02-09 15:25:39 +01:00
|
|
|
ScalaVersionDependentModuleID(version => if (f.isDefinedAt(version)) Seq(f(version)) else Nil)
|
2016-01-12 13:45:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Use this as a dependency setting if the dependencies contain both static and Scala-version
|
|
|
|
|
* dependent entries.
|
|
|
|
|
*/
|
|
|
|
|
def versionDependentDeps(modules: ScalaVersionDependentModuleID*): Def.Setting[Seq[ModuleID]] =
|
2019-02-09 15:25:39 +01:00
|
|
|
libraryDependencies ++= modules.flatMap(m => m.modules(scalaVersion.value))
|
2016-02-18 11:15:24 +02:00
|
|
|
|
|
|
|
|
val ScalaVersion = """\d\.\d+\.\d+(?:-(?:M|RC)\d+)?""".r
|
2019-02-09 15:25:39 +01:00
|
|
|
val nominalScalaVersion: String => String = {
|
2016-02-18 11:15:24 +02:00
|
|
|
// matches:
|
|
|
|
|
// 2.12.0-M1
|
|
|
|
|
// 2.12.0-RC1
|
|
|
|
|
// 2.12.0
|
2019-02-09 15:25:39 +01:00
|
|
|
case version @ ScalaVersion() => version
|
2016-02-18 11:15:24 +02:00
|
|
|
// transforms 2.12.0-custom-version to 2.12.0
|
2019-04-02 15:16:01 +02:00
|
|
|
case version => version.takeWhile(_ != '-')
|
2016-02-18 11:15:24 +02:00
|
|
|
}
|
2016-01-21 18:06:42 +02:00
|
|
|
}
|