2019-01-02 18:55:26 +08:00
|
|
|
/*
|
2020-01-02 07:24:59 -05:00
|
|
|
* Copyright (C) 2016-2020 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
|
|
|
package akka
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
2016-04-13 17:33:32 +02:00
|
|
|
lazy val java8CompatVersion = settingKey[String]("The version of scala-java8-compat to use.")
|
2019-06-18 15:21:26 +01:00
|
|
|
|
2020-01-03 09:16:53 +01:00
|
|
|
val junitVersion = "4.13"
|
2020-01-14 11:32:37 +01:00
|
|
|
val slf4jVersion = "1.7.30"
|
2019-05-29 09:50:28 +01:00
|
|
|
// check agrona version when updating this
|
2020-04-03 17:00:34 +02:00
|
|
|
val aeronVersion = "1.27.0"
|
2019-11-29 12:35:19 +01:00
|
|
|
// needs to be inline with the aeron version, check
|
|
|
|
|
// https://github.com/real-logic/aeron/blob/1.x.y/build.gradle
|
2020-04-03 17:00:34 +02:00
|
|
|
val agronaVersion = "1.4.1"
|
2019-05-29 09:50:28 +01:00
|
|
|
val nettyVersion = "3.10.6.Final"
|
2020-05-04 10:16:46 +02:00
|
|
|
val jacksonVersion = "2.10.4"
|
2020-05-04 08:39:19 +02:00
|
|
|
val protobufJavaVersion = "3.11.4"
|
2019-09-17 17:26:13 +02:00
|
|
|
val logbackVersion = "1.2.3"
|
2018-02-11 19:56:52 +01:00
|
|
|
|
2020-03-20 08:33:25 +00:00
|
|
|
val scala212Version = "2.12.11"
|
2019-11-29 07:38:19 -05:00
|
|
|
val scala213Version = "2.13.1"
|
2014-09-16 10:53:04 +02:00
|
|
|
|
2019-08-27 11:20:37 +02:00
|
|
|
val reactiveStreamsVersion = "1.0.3"
|
|
|
|
|
|
2019-11-19 10:56:17 +01:00
|
|
|
val sslConfigVersion = "0.4.1"
|
2019-06-18 15:21:26 +01:00
|
|
|
|
2020-03-03 11:51:07 +01:00
|
|
|
val scalaTestVersion = "3.1.1"
|
|
|
|
|
val scalaCheckVersion = "1.14.3"
|
|
|
|
|
|
2015-05-21 21:07:37 +02:00
|
|
|
val Versions = Seq(
|
2018-02-11 19:56:52 +01:00
|
|
|
crossScalaVersions := Seq(scala212Version, scala213Version),
|
2016-12-20 15:27:32 +01:00
|
|
|
scalaVersion := System.getProperty("akka.build.scalaVersion", crossScalaVersions.value.head),
|
2016-04-13 17:33:32 +02:00
|
|
|
java8CompatVersion := {
|
2017-03-13 12:39:57 +01:00
|
|
|
CrossVersion.partialVersion(scalaVersion.value) match {
|
2019-05-24 08:11:50 +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.
|
2019-02-09 15:25:39 +01:00
|
|
|
case Some((2, n)) if n >= 13 => "0.9.0"
|
2019-04-19 07:53:27 +01:00
|
|
|
case _ => "0.8.0"
|
2016-04-13 17:33:32 +02:00
|
|
|
}
|
2018-02-11 19:56:52 +01:00
|
|
|
})
|
2014-05-07 14:49:35 +02:00
|
|
|
|
|
|
|
|
object Compile {
|
|
|
|
|
// Compile
|
2015-06-08 12:26:19 +02:00
|
|
|
|
2019-10-14 12:55:56 +02:00
|
|
|
val config = "com.typesafe" % "config" % "1.4.0" // ApacheV2
|
2019-05-29 09:50:28 +01:00
|
|
|
val netty = "io.netty" % "netty" % nettyVersion // ApacheV2
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2017-10-06 10:30:28 +02:00
|
|
|
val scalaReflect = ScalaVersionDependentModuleID.versioned("org.scala-lang" % "scala-reflect" % _) // Scala License
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2017-10-06 10:30:28 +02:00
|
|
|
val slf4jApi = "org.slf4j" % "slf4j-api" % slf4jVersion // MIT
|
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
|
|
|
|
|
val osgiCore = "org.osgi" % "org.osgi.core" % "6.0.0" // ApacheV2
|
|
|
|
|
val osgiCompendium = "org.osgi" % "org.osgi.compendium" % "5.0.0" // ApacheV2
|
2015-03-06 11:58:51 -06:00
|
|
|
|
2017-10-06 10:30:28 +02:00
|
|
|
val sigar = "org.fusesource" % "sigar" % "1.6.4" // ApacheV2
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2020-01-07 10:11:10 +01:00
|
|
|
val jctools = "org.jctools" % "jctools-core" % "3.0.0" // ApacheV2
|
2018-03-21 14:33:49 +01:00
|
|
|
|
2016-01-12 13:45:18 +01:00
|
|
|
// reactive streams
|
2019-08-27 11:20:37 +02:00
|
|
|
val reactiveStreams = "org.reactivestreams" % "reactive-streams" % reactiveStreamsVersion // CC0
|
2016-01-12 13:45:18 +01:00
|
|
|
|
|
|
|
|
// ssl-config
|
2020-04-07 00:17:02 +07:00
|
|
|
val sslConfigCore = "com.typesafe" %% "ssl-config-core" % sslConfigVersion // ApacheV2
|
2017-02-23 14:17:13 +00:00
|
|
|
|
2019-09-09 21:54:09 +09:00
|
|
|
val lmdb = "org.lmdbjava" % "lmdbjava" % "0.7.0" // ApacheV2, OpenLDAP Public License
|
2017-02-23 14:17:13 +00:00
|
|
|
|
2017-10-06 10:30:28 +02:00
|
|
|
val junit = "junit" % "junit" % junitVersion // Common Public License 1.0
|
2016-01-14 11:25:56 +01:00
|
|
|
|
|
|
|
|
// For Java 8 Conversions
|
2017-10-06 10:30:28 +02:00
|
|
|
val java8Compat = Def.setting { "org.scala-lang.modules" %% "scala-java8-compat" % java8CompatVersion.value } // Scala License
|
2017-02-23 14:17:13 +00:00
|
|
|
|
2017-10-06 10:30:28 +02:00
|
|
|
val aeronDriver = "io.aeron" % "aeron-driver" % aeronVersion // ApacheV2
|
|
|
|
|
val aeronClient = "io.aeron" % "aeron-client" % aeronVersion // ApacheV2
|
2019-05-29 09:50:28 +01:00
|
|
|
// Added explicitly for when artery tcp is used
|
|
|
|
|
val agrona = "org.agrona" % "agrona" % agronaVersion // ApacheV2
|
2018-08-01 16:13:03 +01:00
|
|
|
|
2020-06-05 17:34:44 +02:00
|
|
|
val asnOne = ("com.hierynomus" % "asn-one" % "0.4.0").exclude("org.slf4j", "slf4j-api") // ApacheV2
|
2020-05-17 00:09:24 +02:00
|
|
|
|
2018-02-11 19:56:52 +01:00
|
|
|
val jacksonCore = "com.fasterxml.jackson.core" % "jackson-core" % jacksonVersion // ApacheV2
|
|
|
|
|
val jacksonAnnotations = "com.fasterxml.jackson.core" % "jackson-annotations" % jacksonVersion // ApacheV2
|
2019-11-25 14:03:15 +01:00
|
|
|
val jacksonDatabind = "com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion // ApacheV2
|
2018-02-11 19:56:52 +01:00
|
|
|
val jacksonJdk8 = "com.fasterxml.jackson.datatype" % "jackson-datatype-jdk8" % jacksonVersion // ApacheV2
|
|
|
|
|
val jacksonJsr310 = "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % jacksonVersion // ApacheV2
|
|
|
|
|
val jacksonScala = "com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonVersion // ApacheV2
|
|
|
|
|
val jacksonParameterNames = "com.fasterxml.jackson.module" % "jackson-module-parameter-names" % jacksonVersion // ApacheV2
|
|
|
|
|
val jacksonCbor = "com.fasterxml.jackson.dataformat" % "jackson-dataformat-cbor" % jacksonVersion // ApacheV2
|
2020-05-22 04:37:22 -07:00
|
|
|
val lz4Java = "org.lz4" % "lz4-java" % "1.7.1" // ApacheV2
|
2018-02-11 19:56:52 +01:00
|
|
|
|
2019-09-17 17:26:13 +02:00
|
|
|
val logback = "ch.qos.logback" % "logback-classic" % logbackVersion // EPL 1.0
|
2019-08-24 08:46:39 +02:00
|
|
|
|
2015-05-29 18:20:51 +02:00
|
|
|
object Docs {
|
2019-05-24 08:11:50 +02:00
|
|
|
val sprayJson = "io.spray" %% "spray-json" % "1.3.5" % "test"
|
2019-11-19 17:36:34 +01:00
|
|
|
val gson = "com.google.code.gson" % "gson" % "2.8.6" % "test"
|
2015-05-29 18:20:51 +02:00
|
|
|
}
|
|
|
|
|
|
2014-05-07 14:49:35 +02:00
|
|
|
object Test {
|
2017-10-06 10:30:28 +02:00
|
|
|
val commonsMath = "org.apache.commons" % "commons-math" % "2.2" % "test" // ApacheV2
|
2020-07-07 15:45:35 +02:00
|
|
|
val commonsIo = "commons-io" % "commons-io" % "2.7" % "test" // ApacheV2
|
2020-01-07 10:11:35 +01:00
|
|
|
val commonsCodec = "commons-codec" % "commons-codec" % "1.14" % "test" // ApacheV2
|
2017-10-06 10:30:28 +02:00
|
|
|
val junit = "junit" % "junit" % junitVersion % "test" // Common Public License 1.0
|
2019-08-24 08:46:39 +02:00
|
|
|
val logback = Compile.logback % "test" // EPL 1.0
|
2020-03-03 11:51:07 +01:00
|
|
|
|
|
|
|
|
val scalatest = "org.scalatest" %% "scalatest" % scalaTestVersion % "test" // ApacheV2
|
|
|
|
|
val scalacheck = "org.scalacheck" %% "scalacheck" % scalaCheckVersion % "test" // New BSD
|
|
|
|
|
|
|
|
|
|
// The 'scalaTestPlus' projects are independently versioned,
|
|
|
|
|
// but the version of each module starts with the scalatest
|
|
|
|
|
// version it was intended to work with
|
|
|
|
|
val scalatestJUnit = "org.scalatestplus" %% "junit-4-12" % (scalaTestVersion + ".0") % "test" // ApacheV2
|
|
|
|
|
val scalatestTestNG = "org.scalatestplus" %% "testng-6-7" % (scalaTestVersion + ".0") % "test" // ApacheV2
|
|
|
|
|
val scalatestScalaCheck = "org.scalatestplus" %% "scalacheck-1-14" % (scalaTestVersion + ".0") % "test" // ApacheV2
|
|
|
|
|
val scalatestMockito = "org.scalatestplus" %% "mockito-3-2" % (scalaTestVersion + ".0") % "test" // ApacheV2
|
|
|
|
|
|
2017-10-06 10:30:28 +02:00
|
|
|
val pojosr = "com.googlecode.pojosr" % "de.kalpatec.pojosr.framework" % "0.2.1" % "test" // ApacheV2
|
2019-09-09 21:54:09 +09:00
|
|
|
val tinybundles = "org.ops4j.pax.tinybundles" % "tinybundles" % "3.0.0" % "test" // ApacheV2
|
2017-10-06 10:30:28 +02:00
|
|
|
val log4j = "log4j" % "log4j" % "1.2.17" % "test" // ApacheV2
|
=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
|
2017-10-06 10:30:28 +02:00
|
|
|
val jimfs = "com.google.jimfs" % "jimfs" % "1.1" % "test" // ApacheV2
|
2016-08-29 16:33:33 +02:00
|
|
|
|
2018-10-16 15:35:55 +02:00
|
|
|
// docker utils
|
2019-09-09 21:54:09 +09:00
|
|
|
val dockerClient = "com.spotify" % "docker-client" % "8.16.0" % "test" // ApacheV2
|
2018-10-16 15:35:55 +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
|
2020-05-24 18:05:27 +02:00
|
|
|
val metrics = "io.dropwizard.metrics" % "metrics-core" % "4.1.9" % "test" // ApacheV2
|
|
|
|
|
val metricsJvm = "io.dropwizard.metrics" % "metrics-jvm" % "4.1.9" % "test" // ApacheV2
|
2019-09-09 21:54:09 +09:00
|
|
|
val latencyUtils = "org.latencyutils" % "LatencyUtils" % "2.0.3" % "test" // Free BSD
|
2019-12-17 17:17:11 +01:00
|
|
|
val hdrHistogram = "org.hdrhistogram" % "HdrHistogram" % "2.1.12" % "test" // CC0
|
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
|
2017-10-06 10:30:28 +02:00
|
|
|
val slf4jJul = "org.slf4j" % "jul-to-slf4j" % slf4jVersion % "test" // MIT
|
|
|
|
|
val slf4jLog4j = "org.slf4j" % "log4j-over-slf4j" % slf4jVersion % "test" // MIT
|
2016-01-12 13:45:18 +01:00
|
|
|
|
|
|
|
|
// reactive streams tck
|
2019-08-27 11:20:37 +02:00
|
|
|
val reactiveStreamsTck = "org.reactivestreams" % "reactive-streams-tck" % reactiveStreamsVersion % "test" // CC0
|
2019-07-23 15:22:07 +01:00
|
|
|
|
2019-09-09 21:54:09 +09:00
|
|
|
val protobufRuntime = "com.google.protobuf" % "protobuf-java" % protobufJavaVersion % "test"
|
2014-12-12 11:49:32 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
object Provided {
|
|
|
|
|
// TODO remove from "test" config
|
2017-10-06 10:30:28 +02:00
|
|
|
val sigarLoader = "io.kamon" % "sigar-loader" % "1.6.6-rev002" % "optional;provided;test" // ApacheV2
|
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"
|
|
|
|
|
|
2019-09-09 21:54:09 +09:00
|
|
|
val levelDB = "org.iq80.leveldb" % "leveldb" % "0.12" % "optional;provided" // ApacheV2
|
|
|
|
|
val levelDBmultiJVM = "org.iq80.leveldb" % "leveldb" % "0.12" % "optional;provided;multi-jvm;test" // ApacheV2
|
2017-10-06 10:30:28 +02:00
|
|
|
val levelDBNative = "org.fusesource.leveldbjni" % "leveldbjni-all" % "1.8" % "optional;provided" // New BSD
|
2018-02-22 12:25:04 +01:00
|
|
|
|
|
|
|
|
val junit = Compile.junit % "optional;provided;test"
|
2018-08-01 16:13:03 +01:00
|
|
|
|
2020-03-03 11:51:07 +01:00
|
|
|
val scalatest = "org.scalatest" %% "scalatest" % scalaTestVersion % "optional;provided;test" // ApacheV2
|
2018-09-07 16:08:24 +02:00
|
|
|
|
2019-08-24 08:46:39 +02:00
|
|
|
val logback = Compile.logback % "optional;provided;test" // EPL 1.0
|
|
|
|
|
|
2020-04-27 11:15:10 +02:00
|
|
|
val protobufRuntime = "com.google.protobuf" % "protobuf-java" % protobufJavaVersion % "optional;provided"
|
|
|
|
|
|
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?
|
2015-05-21 21:07:37 +02:00
|
|
|
val l = libraryDependencies
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2018-11-22 16:18:10 +01:00
|
|
|
val actor = l ++= Seq(config, java8Compat.value)
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2019-08-23 13:00:00 +01:00
|
|
|
val actorTyped = l ++= Seq(slf4jApi)
|
|
|
|
|
|
2020-03-03 11:51:07 +01:00
|
|
|
val discovery = l ++= Seq(Test.junit, Test.scalatest)
|
2019-03-28 13:24:46 +01:00
|
|
|
|
2020-03-03 11:51:07 +01:00
|
|
|
val coordination = l ++= Seq(Test.junit, Test.scalatest)
|
2018-12-05 13:01:24 +00:00
|
|
|
|
2020-03-03 11:51:07 +01:00
|
|
|
val testkit = l ++= Seq(Test.junit, Test.scalatest) ++ Test.metricsAll
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2018-10-16 15:35:55 +02:00
|
|
|
val actorTests = l ++= Seq(
|
2019-04-02 15:16:01 +02:00
|
|
|
Test.junit,
|
2020-03-03 11:51:07 +01:00
|
|
|
Test.scalatest,
|
2020-02-28 10:59:36 +01:00
|
|
|
Test.scalatestJUnit,
|
|
|
|
|
Test.scalatestScalaCheck,
|
2019-04-02 15:16:01 +02:00
|
|
|
Test.commonsCodec,
|
|
|
|
|
Test.commonsMath,
|
2020-03-03 11:51:07 +01:00
|
|
|
Test.scalacheck,
|
2019-04-02 15:16:01 +02:00
|
|
|
Test.jimfs,
|
|
|
|
|
Test.dockerClient,
|
|
|
|
|
Provided.activation // dockerClient needs javax.activation.DataSource in JDK 11+
|
|
|
|
|
)
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2020-03-20 08:33:25 +00:00
|
|
|
val actorTestkitTyped = l ++= Seq(Provided.logback, Provided.junit, Provided.scalatest, Test.scalatestJUnit)
|
2018-02-22 12:25:04 +01:00
|
|
|
|
2020-05-17 00:09:24 +02:00
|
|
|
val pki = l ++=
|
|
|
|
|
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,
|
2020-05-17 00:09:24 +02:00
|
|
|
Test.scalatest)
|
|
|
|
|
|
2019-05-29 09:50:28 +01:00
|
|
|
val remoteDependencies = Seq(netty, aeronDriver, aeronClient)
|
|
|
|
|
val remoteOptionalDependencies = remoteDependencies.map(_ % "optional")
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2020-03-03 11:51:07 +01:00
|
|
|
val remote = l ++= Seq(agrona, Test.junit, Test.scalatest, Test.jimfs, Test.protobufRuntime) ++ remoteOptionalDependencies
|
2019-05-29 09:50:28 +01:00
|
|
|
|
2020-03-03 11:51:07 +01:00
|
|
|
val remoteTests = l ++= Seq(Test.junit, Test.scalatest) ++ remoteDependencies
|
2019-05-29 09:50:28 +01:00
|
|
|
|
2019-06-05 10:22:26 +01:00
|
|
|
val multiNodeTestkit = l ++= Seq(netty)
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2020-03-03 11:51:07 +01:00
|
|
|
val cluster = l ++= Seq(Test.junit, Test.scalatest)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2020-03-03 11:51:07 +01:00
|
|
|
val clusterTools = l ++= Seq(Test.junit, Test.scalatest)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2019-04-02 15:16:01 +02:00
|
|
|
val clusterSharding = l ++= Seq(
|
|
|
|
|
Provided.levelDBmultiJVM,
|
|
|
|
|
Provided.levelDBNative,
|
|
|
|
|
Test.junit,
|
2020-03-03 11:51:07 +01:00
|
|
|
Test.scalatest,
|
2019-10-10 15:38:56 +02:00
|
|
|
Test.commonsIo)
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2020-01-24 07:31:05 -08:00
|
|
|
val clusterMetrics = l ++= Seq(
|
|
|
|
|
Provided.sigarLoader,
|
|
|
|
|
Test.slf4jJul,
|
|
|
|
|
Test.slf4jLog4j,
|
|
|
|
|
Test.logback,
|
2020-02-28 10:59:36 +01:00
|
|
|
Test.scalatestMockito)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2020-03-03 11:51:07 +01:00
|
|
|
val distributedData = l ++= Seq(lmdb, Test.junit, Test.scalatest)
|
2014-07-08 18:30:15 +02:00
|
|
|
|
2015-05-21 21:07:37 +02:00
|
|
|
val slf4j = l ++= Seq(slf4jApi, Test.logback)
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2019-04-02 15:16:01 +02:00
|
|
|
val persistence = l ++= Seq(
|
|
|
|
|
Provided.levelDB,
|
|
|
|
|
Provided.levelDBNative,
|
2020-03-03 11:51:07 +01:00
|
|
|
Test.scalatest,
|
2020-02-28 10:59:36 +01:00
|
|
|
Test.scalatestJUnit,
|
2019-04-02 15:16:01 +02:00
|
|
|
Test.junit,
|
|
|
|
|
Test.commonsIo,
|
2019-08-26 16:02:48 +02:00
|
|
|
Test.commonsCodec)
|
2019-04-02 15:16:01 +02:00
|
|
|
|
2020-03-20 08:33:25 +00:00
|
|
|
val persistenceQuery = l ++= Seq(Test.scalatest, Test.junit, Test.commonsIo, Provided.levelDB, Provided.levelDBNative)
|
2019-04-02 15:16:01 +02:00
|
|
|
|
|
|
|
|
val persistenceTck = l ++= Seq(
|
2020-03-03 11:51:07 +01:00
|
|
|
Test.scalatest.withConfigurations(Some("compile")),
|
2019-04-02 15:16:01 +02:00
|
|
|
Test.junit.withConfigurations(Some("compile")),
|
|
|
|
|
Provided.levelDB,
|
|
|
|
|
Provided.levelDBNative)
|
2014-05-07 14:49:35 +02:00
|
|
|
|
2020-04-29 22:06:42 +02:00
|
|
|
val persistenceTestKit = l ++= Seq(Test.scalatest, Test.logback)
|
2020-03-20 22:18:43 +09:00
|
|
|
|
2016-02-15 16:53:57 +01:00
|
|
|
val persistenceShared = l ++= Seq(Provided.levelDB, Provided.levelDBNative)
|
|
|
|
|
|
2018-02-11 19:56:52 +01:00
|
|
|
val jackson = l ++= Seq(
|
|
|
|
|
jacksonCore,
|
|
|
|
|
jacksonAnnotations,
|
|
|
|
|
jacksonDatabind,
|
|
|
|
|
jacksonScala,
|
|
|
|
|
jacksonJdk8,
|
|
|
|
|
jacksonJsr310,
|
|
|
|
|
jacksonParameterNames,
|
|
|
|
|
jacksonCbor,
|
2020-05-22 04:37:22 -07:00
|
|
|
lz4Java,
|
2018-02-11 19:56:52 +01:00
|
|
|
Test.junit,
|
2020-03-03 11:51:07 +01:00
|
|
|
Test.scalatest)
|
2018-02-11 19:56:52 +01:00
|
|
|
|
2019-04-02 15:16:01 +02:00
|
|
|
val osgi = l ++= Seq(
|
|
|
|
|
osgiCore,
|
|
|
|
|
osgiCompendium,
|
|
|
|
|
Test.logback,
|
|
|
|
|
Test.commonsIo,
|
|
|
|
|
Test.pojosr,
|
|
|
|
|
Test.tinybundles,
|
2020-03-03 11:51:07 +01:00
|
|
|
Test.scalatest,
|
2019-04-02 15:16:01 +02:00
|
|
|
Test.junit)
|
2014-09-16 10:53:04 +02:00
|
|
|
|
2020-03-03 11:51:07 +01:00
|
|
|
val docs = l ++= Seq(Test.scalatest, Test.junit, Docs.sprayJson, Docs.gson, Provided.levelDB)
|
2014-09-16 10:53:04 +02:00
|
|
|
|
2020-03-24 07:59:33 +01:00
|
|
|
val benchJmh = l ++= Seq(logback, Provided.levelDB, Provided.levelDBNative, Compile.jctools)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2016-10-18 15:17:17 +02:00
|
|
|
// akka stream
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2020-04-07 00:17:02 +07:00
|
|
|
lazy val stream = l ++= Seq[sbt.ModuleID](reactiveStreams, sslConfigCore, Test.scalatest)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2020-03-03 11:51:07 +01:00
|
|
|
lazy val streamTestkit = l ++= Seq(Test.scalatest, Test.scalacheck, Test.junit)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2020-01-24 07:31:05 -08:00
|
|
|
lazy val streamTests = l ++= Seq(
|
2020-03-03 11:51:07 +01:00
|
|
|
Test.scalatest,
|
|
|
|
|
Test.scalacheck,
|
2020-02-28 10:59:36 +01:00
|
|
|
Test.scalatestScalaCheck,
|
2020-01-24 07:31:05 -08:00
|
|
|
Test.junit,
|
|
|
|
|
Test.commonsIo,
|
|
|
|
|
Test.jimfs)
|
2016-01-12 13:45:18 +01:00
|
|
|
|
2020-01-24 07:31:05 -08:00
|
|
|
lazy val streamTestsTck = l ++= Seq(
|
2020-03-03 11:51:07 +01:00
|
|
|
Test.scalatest,
|
2020-02-28 10:59:36 +01:00
|
|
|
Test.scalatestTestNG,
|
2020-03-03 11:51:07 +01:00
|
|
|
Test.scalacheck,
|
2020-01-24 07:31:05 -08:00
|
|
|
Test.junit,
|
|
|
|
|
Test.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
|
|
|
}
|