2011-11-25 11:01:03 +01:00
|
|
|
|
/**
|
2015-03-07 22:58:48 -08:00
|
|
|
|
* Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
|
2011-11-25 11:01:03 +01:00
|
|
|
|
*/
|
|
|
|
|
|
|
2011-09-23 10:21:03 +02:00
|
|
|
|
package akka
|
|
|
|
|
|
|
2014-11-23 22:18:09 +01:00
|
|
|
|
import java.io.FileInputStream
|
|
|
|
|
|
import java.io.InputStreamReader
|
2012-12-18 12:10:59 +01:00
|
|
|
|
import java.util.Properties
|
2014-07-08 18:30:15 +02:00
|
|
|
|
|
2014-11-23 22:18:09 +01:00
|
|
|
|
import akka.TestExtras.JUnitFileReporting
|
|
|
|
|
|
import com.typesafe.sbt.S3Plugin.S3
|
|
|
|
|
|
import com.typesafe.sbt.S3Plugin.s3Settings
|
2015-07-01 12:19:20 +02:00
|
|
|
|
import com.typesafe.sbt.pgp.PgpKeys.publishSigned
|
2014-11-23 22:18:09 +01:00
|
|
|
|
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm
|
2014-07-08 18:30:15 +02:00
|
|
|
|
import sbt.Keys._
|
|
|
|
|
|
import sbt._
|
2015-09-04 16:01:01 +02:00
|
|
|
|
import sbtunidoc.Plugin.ScalaUnidoc
|
|
|
|
|
|
import sbtunidoc.Plugin.UnidocKeys._
|
2011-07-04 19:16:43 +12:00
|
|
|
|
|
|
|
|
|
|
object AkkaBuild extends Build {
|
2011-07-11 15:38:22 -06:00
|
|
|
|
System.setProperty("akka.mode", "test") // Is there better place for this?
|
2012-12-18 12:10:59 +01:00
|
|
|
|
|
|
|
|
|
|
// Load system properties from a file to make configuration from Jenkins easier
|
|
|
|
|
|
loadSystemProperties("project/akka-build.properties")
|
|
|
|
|
|
|
2014-11-13 18:56:02 +02:00
|
|
|
|
override def buildLoaders = BuildLoader.transform(Sample.buildTransformer) :: Nil
|
|
|
|
|
|
|
2015-04-30 09:23:18 +02:00
|
|
|
|
val enableMiMa = true
|
2012-06-28 15:33:49 +02:00
|
|
|
|
|
2015-05-05 19:39:56 +02:00
|
|
|
|
val parallelExecutionByDefault = false // TODO: enable this once we're sure it doesn not break things
|
|
|
|
|
|
|
2015-05-21 21:07:37 +02:00
|
|
|
|
lazy val buildSettings = Dependencies.Versions ++ Seq(
|
2014-11-30 15:53:41 +02:00
|
|
|
|
organization := "com.typesafe.akka",
|
2015-05-21 21:07:37 +02:00
|
|
|
|
version := "2.4-SNAPSHOT"
|
2011-07-08 18:01:19 +12:00
|
|
|
|
)
|
2011-07-04 19:16:43 +12:00
|
|
|
|
|
2014-05-12 16:19:29 +02:00
|
|
|
|
lazy val root = Project(
|
2011-07-04 19:16:43 +12:00
|
|
|
|
id = "akka",
|
|
|
|
|
|
base = file("."),
|
2015-05-21 09:48:49 +03:00
|
|
|
|
settings = parentSettings ++ Release.settings ++
|
|
|
|
|
|
SphinxDoc.akkaSettings ++ Dist.settings ++ s3Settings ++
|
2016-01-12 13:45:18 +01:00
|
|
|
|
Protobuf.settings ++ Seq(
|
2015-05-05 19:39:56 +02:00
|
|
|
|
parallelExecution in GlobalScope := System.getProperty("akka.parallelExecution", parallelExecutionByDefault.toString).toBoolean,
|
2014-01-22 12:48:10 +01:00
|
|
|
|
Dist.distExclude := Seq(actorTests.id, docs.id, samples.id, osgi.id),
|
2013-08-21 09:22:46 +02:00
|
|
|
|
|
2015-09-04 16:01:01 +02:00
|
|
|
|
// FIXME problem with scalaunidoc:doc, there must be a better way
|
|
|
|
|
|
unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject -- inProjects(protobuf, samples,
|
|
|
|
|
|
sampleCamelJava, sampleCamelScala, sampleClusterJava, sampleClusterScala, sampleFsmScala, sampleFsmJavaLambda,
|
|
|
|
|
|
sampleMainJava, sampleMainScala, sampleMainJavaLambda, sampleMultiNodeScala,
|
|
|
|
|
|
samplePersistenceJava, samplePersistenceScala, samplePersistenceJavaLambda,
|
|
|
|
|
|
sampleRemoteJava, sampleRemoteScala, sampleSupervisionJavaLambda,
|
|
|
|
|
|
sampleDistributedDataScala, sampleDistributedDataJava),
|
2015-10-23 09:10:25 +03:00
|
|
|
|
|
2013-08-21 09:22:46 +02:00
|
|
|
|
S3.host in S3.upload := "downloads.typesafe.com.s3.amazonaws.com",
|
|
|
|
|
|
S3.progress in S3.upload := true,
|
|
|
|
|
|
mappings in S3.upload <<= (Release.releaseDirectory, version) map { (d, v) =>
|
2013-12-04 12:12:38 +01:00
|
|
|
|
val downloads = d / "downloads"
|
2014-11-30 15:53:41 +02:00
|
|
|
|
val archivesPathFinder = downloads * s"*$v.zip"
|
2013-12-04 12:12:38 +01:00
|
|
|
|
archivesPathFinder.get.map(file => (file -> ("akka/" + file.getName)))
|
2015-01-22 20:26:34 +02:00
|
|
|
|
}
|
2011-07-08 10:20:10 +12:00
|
|
|
|
),
|
2015-08-20 13:24:39 +03:00
|
|
|
|
aggregate = Seq(actor, testkit, actorTests, remote, remoteTests, camel,
|
2015-05-17 12:28:47 +02:00
|
|
|
|
cluster, clusterMetrics, clusterTools, clusterSharding, distributedData,
|
2015-02-18 00:15:50 +01:00
|
|
|
|
slf4j, agent, persistence, persistenceQuery, persistenceTck, kernel, osgi, docs, contrib, samples, multiNodeTestkit, benchJmh, typed, protobuf)
|
2011-07-04 19:16:43 +12:00
|
|
|
|
)
|
|
|
|
|
|
|
2013-12-03 09:18:26 +01:00
|
|
|
|
lazy val akkaScalaNightly = Project(
|
|
|
|
|
|
id = "akka-scala-nightly",
|
|
|
|
|
|
base = file("akka-scala-nightly"),
|
2014-09-11 14:32:54 +02:00
|
|
|
|
// remove dependencies that we have to build ourselves (Scala STM)
|
2014-03-12 11:06:35 +01:00
|
|
|
|
// samples don't work with dbuild right now
|
2015-08-20 13:24:39 +03:00
|
|
|
|
aggregate = Seq(actor, testkit, actorTests, remote, remoteTests, camel,
|
2015-05-17 12:28:47 +02:00
|
|
|
|
cluster, clusterMetrics, clusterTools, clusterSharding, distributedData,
|
2016-01-12 13:45:18 +01:00
|
|
|
|
slf4j, persistence, persistenceQuery, persistenceTck, kernel, osgi, contrib, multiNodeTestkit, benchJmh, typed, protobuf,
|
|
|
|
|
|
streamAndHttp
|
|
|
|
|
|
)
|
2015-01-22 20:26:34 +02:00
|
|
|
|
).disablePlugins(ValidatePullRequest)
|
2013-12-03 09:18:26 +01:00
|
|
|
|
|
2011-07-04 19:16:43 +12:00
|
|
|
|
lazy val actor = Project(
|
|
|
|
|
|
id = "akka-actor",
|
2014-05-12 16:19:29 +02:00
|
|
|
|
base = file("akka-actor")
|
2013-03-05 19:10:45 +01:00
|
|
|
|
)
|
2011-07-04 19:16:43 +12:00
|
|
|
|
|
|
|
|
|
|
lazy val testkit = Project(
|
|
|
|
|
|
id = "akka-testkit",
|
|
|
|
|
|
base = file("akka-testkit"),
|
2014-05-12 16:19:29 +02:00
|
|
|
|
dependencies = Seq(actor)
|
2011-07-04 19:16:43 +12:00
|
|
|
|
)
|
|
|
|
|
|
|
add akka-typed project with generic ActorRef
This is the first step towards more type-safety in Actor interactions,
comprising:
* generic ActorRef[T] that only accepts T messages
* generic ActorSystem[T] extends ActorRef[T] (sending to the guardian,
whose Props[T] are provided for ActorSystem construction)
* removed the Actor trait: everything in there has been made into
messages and signals
* new Behavior[T] abstraction that consumes messages (of type T) or
Signals (lifecycle hooks, Terminated, ReceiveTimeout, Failed),
producing the next Behavior[T] as the result each time
* the ask pattern is provided and yields properly typed Futures
* variants of ActorContext are provided for synchronous testing of
Behaviors
All of this is implemented without touching code outside akka-typed
(apart from making guardianProps configurable), creating wrapper objects
around ActorRef, ActorContext, ActorSystem, Props and providing an Actor
implementation that just runs a Behavior.
2015-01-28 20:45:21 +01:00
|
|
|
|
lazy val typed = Project(
|
|
|
|
|
|
id = "akka-typed-experimental",
|
|
|
|
|
|
base = file("akka-typed"),
|
|
|
|
|
|
dependencies = Seq(testkit % "compile;test->test")
|
|
|
|
|
|
)
|
|
|
|
|
|
|
2011-07-04 19:16:43 +12:00
|
|
|
|
lazy val actorTests = Project(
|
|
|
|
|
|
id = "akka-actor-tests",
|
|
|
|
|
|
base = file("akka-actor-tests"),
|
2015-08-31 12:38:07 +02:00
|
|
|
|
dependencies = Seq(testkit % "compile;test->test")
|
2011-07-04 19:16:43 +12:00
|
|
|
|
)
|
|
|
|
|
|
|
2014-11-23 22:18:09 +01:00
|
|
|
|
lazy val benchJmh = Project(
|
|
|
|
|
|
id = "akka-bench-jmh",
|
|
|
|
|
|
base = file("akka-bench-jmh"),
|
2015-09-19 15:29:48 +02:00
|
|
|
|
dependencies = Seq(actor, persistence, distributedData, testkit).map(_ % "compile;compile->test;provided->provided")
|
2015-01-22 20:26:34 +02:00
|
|
|
|
).disablePlugins(ValidatePullRequest)
|
2014-11-23 22:18:09 +01:00
|
|
|
|
|
2015-02-18 00:15:50 +01:00
|
|
|
|
lazy val protobuf = Project(
|
|
|
|
|
|
id = "akka-protobuf",
|
|
|
|
|
|
base = file("akka-protobuf")
|
|
|
|
|
|
)
|
|
|
|
|
|
|
2011-09-09 13:46:36 +02:00
|
|
|
|
lazy val remote = Project(
|
|
|
|
|
|
id = "akka-remote",
|
|
|
|
|
|
base = file("akka-remote"),
|
2015-02-18 00:15:50 +01:00
|
|
|
|
dependencies = Seq(actor, actorTests % "test->test", testkit % "test->test", protobuf)
|
2013-02-10 16:04:59 -05:00
|
|
|
|
)
|
|
|
|
|
|
|
2013-02-22 14:52:40 +01:00
|
|
|
|
lazy val multiNodeTestkit = Project(
|
2013-02-10 16:04:59 -05:00
|
|
|
|
id = "akka-multi-node-testkit",
|
|
|
|
|
|
base = file("akka-multi-node-testkit"),
|
2014-05-12 16:19:29 +02:00
|
|
|
|
dependencies = Seq(remote, testkit)
|
2012-05-29 08:28:54 +02:00
|
|
|
|
)
|
2011-09-09 13:46:36 +02:00
|
|
|
|
|
2012-05-10 10:24:05 +02:00
|
|
|
|
lazy val remoteTests = Project(
|
2013-02-10 16:04:59 -05:00
|
|
|
|
id = "akka-remote-tests",
|
2012-05-10 10:24:05 +02:00
|
|
|
|
base = file("akka-remote-tests"),
|
2014-05-12 16:19:29 +02:00
|
|
|
|
dependencies = Seq(actorTests % "test->test", multiNodeTestkit)
|
2012-05-10 10:24:05 +02:00
|
|
|
|
) configs (MultiJvm)
|
|
|
|
|
|
|
2012-02-06 17:29:17 +01:00
|
|
|
|
lazy val cluster = Project(
|
2013-05-23 15:18:00 +02:00
|
|
|
|
id = "akka-cluster",
|
2012-01-31 13:33:04 +01:00
|
|
|
|
base = file("akka-cluster"),
|
2014-05-12 16:19:29 +02:00
|
|
|
|
dependencies = Seq(remote, remoteTests % "test->test" , testkit % "test->test")
|
2013-09-13 11:47:32 +02:00
|
|
|
|
) configs (MultiJvm)
|
2012-01-31 13:33:04 +01:00
|
|
|
|
|
2014-12-12 11:49:32 -06:00
|
|
|
|
lazy val clusterMetrics = Project(
|
|
|
|
|
|
id = "akka-cluster-metrics",
|
|
|
|
|
|
base = file("akka-cluster-metrics"),
|
|
|
|
|
|
dependencies = Seq(cluster % "compile->compile;test->test;multi-jvm->multi-jvm", slf4j % "test->compile")
|
|
|
|
|
|
) configs (MultiJvm)
|
|
|
|
|
|
|
2015-04-27 14:25:10 +02:00
|
|
|
|
lazy val clusterTools = Project(
|
|
|
|
|
|
id = "akka-cluster-tools",
|
|
|
|
|
|
base = file("akka-cluster-tools"),
|
|
|
|
|
|
dependencies = Seq(cluster % "compile->compile;test->test;multi-jvm->multi-jvm")
|
|
|
|
|
|
) configs (MultiJvm)
|
2015-05-21 09:48:49 +03:00
|
|
|
|
|
2015-04-27 14:48:28 +02:00
|
|
|
|
lazy val clusterSharding = Project(
|
|
|
|
|
|
id = "akka-cluster-sharding",
|
|
|
|
|
|
base = file("akka-cluster-sharding"),
|
2015-08-21 09:53:53 +02:00
|
|
|
|
// TODO akka-distributed-data dependency should be provided in pom.xml artifact.
|
|
|
|
|
|
// 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.
|
2015-05-21 09:48:49 +03:00
|
|
|
|
dependencies = Seq(cluster % "compile->compile;test->test;multi-jvm->multi-jvm",
|
2015-08-21 09:53:53 +02:00
|
|
|
|
persistence % "compile;test->provided", distributedData % "provided;test", clusterTools)
|
2015-04-27 14:48:28 +02:00
|
|
|
|
) configs (MultiJvm)
|
2015-08-20 13:24:39 +03:00
|
|
|
|
|
2015-05-17 12:28:47 +02:00
|
|
|
|
lazy val distributedData = Project(
|
2015-06-26 15:31:49 +02:00
|
|
|
|
id = "akka-distributed-data-experimental",
|
2015-05-17 12:28:47 +02:00
|
|
|
|
base = file("akka-distributed-data"),
|
|
|
|
|
|
dependencies = Seq(cluster % "compile->compile;test->test;multi-jvm->multi-jvm")
|
|
|
|
|
|
) configs (MultiJvm)
|
2015-04-27 14:25:10 +02:00
|
|
|
|
|
2011-07-04 19:16:43 +12:00
|
|
|
|
lazy val slf4j = Project(
|
|
|
|
|
|
id = "akka-slf4j",
|
|
|
|
|
|
base = file("akka-slf4j"),
|
2014-05-12 16:19:29 +02:00
|
|
|
|
dependencies = Seq(actor, testkit % "test->test")
|
2011-07-04 19:16:43 +12:00
|
|
|
|
)
|
|
|
|
|
|
|
2011-12-19 15:46:06 +13:00
|
|
|
|
lazy val agent = Project(
|
|
|
|
|
|
id = "akka-agent",
|
|
|
|
|
|
base = file("akka-agent"),
|
2014-05-12 16:19:29 +02:00
|
|
|
|
dependencies = Seq(actor, testkit % "test->test")
|
2011-12-19 15:46:06 +13:00
|
|
|
|
)
|
|
|
|
|
|
|
2013-09-14 14:19:18 +02:00
|
|
|
|
lazy val persistence = Project(
|
2015-08-11 11:20:32 +02:00
|
|
|
|
id = "akka-persistence",
|
2013-09-14 14:19:18 +02:00
|
|
|
|
base = file("akka-persistence"),
|
2015-02-18 00:15:50 +01:00
|
|
|
|
dependencies = Seq(actor, remote % "test->test", testkit % "test->test", protobuf)
|
2013-09-14 14:19:18 +02:00
|
|
|
|
)
|
|
|
|
|
|
|
2015-06-08 12:26:19 +02:00
|
|
|
|
lazy val persistenceQuery = Project(
|
|
|
|
|
|
id = "akka-persistence-query-experimental",
|
|
|
|
|
|
base = file("akka-persistence-query"),
|
2016-01-12 13:45:18 +01:00
|
|
|
|
dependencies = Seq(
|
|
|
|
|
|
stream,
|
|
|
|
|
|
persistence % "compile;provided->provided;test->test",
|
|
|
|
|
|
testkit % "compile;test->test",
|
|
|
|
|
|
streamTestkit % "compile;test->test")
|
2015-06-08 12:26:19 +02:00
|
|
|
|
)
|
|
|
|
|
|
|
2014-07-08 18:30:15 +02:00
|
|
|
|
lazy val persistenceTck = Project(
|
2015-08-11 11:20:32 +02:00
|
|
|
|
id = "akka-persistence-tck",
|
2014-07-08 18:30:15 +02:00
|
|
|
|
base = file("akka-persistence-tck"),
|
2015-03-06 11:58:51 -06:00
|
|
|
|
dependencies = Seq(persistence % "compile;provided->provided;test->test", testkit % "compile;test->test")
|
2014-07-08 18:30:15 +02:00
|
|
|
|
)
|
|
|
|
|
|
|
2016-01-12 13:45:18 +01:00
|
|
|
|
lazy val streamAndHttp = Project(
|
|
|
|
|
|
id = "akka-stream-and-http-experimental",
|
|
|
|
|
|
base = file("akka-stream-and-http"),
|
|
|
|
|
|
settings = parentSettings ++ Release.settings ++
|
|
|
|
|
|
SphinxDoc.akkaSettings ++
|
|
|
|
|
|
Dist.settings ++
|
|
|
|
|
|
Protobuf.settings ++ Seq(
|
|
|
|
|
|
unidocProjectFilter in (ScalaUnidoc, unidoc) := inAnyProject,
|
|
|
|
|
|
Dist.distExclude := Seq(),
|
|
|
|
|
|
// testMailbox in GlobalScope := System.getProperty("akka.testMailbox", "false").toBoolean,
|
|
|
|
|
|
parallelExecution in GlobalScope := System.getProperty("akka.parallelExecution", "false").toBoolean,
|
|
|
|
|
|
Publish.defaultPublishTo in ThisBuild <<= crossTarget / "repository"
|
|
|
|
|
|
// sources in JavaDoc <<= junidocSources,
|
|
|
|
|
|
|
|
|
|
|
|
// javacOptions in JavaDoc ++= Seq("-Xdoclint:none"), TODO likely still needed
|
|
|
|
|
|
// artifactName in packageDoc in JavaDoc := ((sv, mod, art) => "" + mod.name + "_" + sv.binary + "-" + mod.revision + "-javadoc.jar"),
|
|
|
|
|
|
// packageDoc in Compile <<= packageDoc in JavaDoc,
|
|
|
|
|
|
|
|
|
|
|
|
// // generate online version of docs
|
|
|
|
|
|
// sphinxInputs in Sphinx <<= sphinxInputs in Sphinx in LocalProject(docsDev.id) map { inputs => inputs.copy(tags = inputs.tags :+ "online") },
|
|
|
|
|
|
// // don't regenerate the pdf, just reuse the akka-docs version
|
|
|
|
|
|
// generatedPdf in Sphinx <<= generatedPdf in Sphinx in LocalProject(docsDev.id) map identity,
|
|
|
|
|
|
// generatedEpub in Sphinx <<= generatedEpub in Sphinx in LocalProject(docsDev.id) map identity,
|
|
|
|
|
|
|
|
|
|
|
|
// publishArtifact in packageSite := false
|
|
|
|
|
|
),
|
|
|
|
|
|
aggregate = Seq(parsing, stream, streamTestkit, streamTests, streamTestsTck, httpParent)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val httpParent = Project(
|
|
|
|
|
|
id = "akka-http-parent-experimental",
|
|
|
|
|
|
base = file("akka-http-parent"),
|
|
|
|
|
|
settings = parentSettings,
|
|
|
|
|
|
aggregate = Seq(
|
|
|
|
|
|
httpCore,
|
|
|
|
|
|
http,
|
|
|
|
|
|
httpTestkit,
|
|
|
|
|
|
httpTests, httpTestsJava8,
|
|
|
|
|
|
httpMarshallersScala, httpMarshallersJava
|
|
|
|
|
|
)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val httpCore = Project(
|
|
|
|
|
|
id = "akka-http-core-experimental",
|
|
|
|
|
|
base = file("akka-http-core"),
|
2016-01-13 01:28:59 +01:00
|
|
|
|
dependencies = Seq(stream, parsing, streamTestkit % "test->test"),
|
2016-01-12 13:45:18 +01:00
|
|
|
|
settings = defaultSettings
|
|
|
|
|
|
// ++ (if (GenJavaDocEnabled) Seq(
|
|
|
|
|
|
// // genjavadoc needs to generate synthetic methods since the java code uses them
|
|
|
|
|
|
// scalacOptions += "-P:genjavadoc:suppressSynthetic=false",
|
|
|
|
|
|
// // FIXME: see #18056
|
|
|
|
|
|
// sources in JavaDoc ~= (_.filterNot(_.getPath.contains("Access$minusControl$minusAllow$minusOrigin")))
|
|
|
|
|
|
// ) else Nil
|
|
|
|
|
|
// )
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val http = Project(
|
|
|
|
|
|
id = "akka-http-experimental",
|
|
|
|
|
|
base = file("akka-http"),
|
|
|
|
|
|
dependencies = Seq(httpCore),
|
|
|
|
|
|
settings =
|
|
|
|
|
|
defaultSettings ++
|
|
|
|
|
|
Seq(
|
|
|
|
|
|
scalacOptions in Compile += "-language:_"
|
|
|
|
|
|
)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val streamTestkit = Project(
|
|
|
|
|
|
id = "akka-stream-testkit",
|
|
|
|
|
|
base = file("akka-stream-testkit"), // TODO that persistence dependency
|
|
|
|
|
|
dependencies = Seq(stream, persistence % "compile;provided->provided;test->test", testkit % "compile;test->test"),
|
|
|
|
|
|
settings = defaultSettings ++ experimentalSettings
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val httpTestkit = Project(
|
|
|
|
|
|
id = "akka-http-testkit-experimental",
|
|
|
|
|
|
base = file("akka-http-testkit"),
|
|
|
|
|
|
dependencies = Seq(http, streamTestkit),
|
|
|
|
|
|
settings =
|
|
|
|
|
|
defaultSettings ++ Seq(
|
|
|
|
|
|
scalacOptions in Compile += "-language:_"
|
|
|
|
|
|
)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val httpTests = Project(
|
|
|
|
|
|
id = "akka-http-tests-experimental",
|
|
|
|
|
|
base = file("akka-http-tests"),
|
|
|
|
|
|
dependencies = Seq(httpTestkit % "test", httpSprayJson, httpXml, httpJackson),
|
|
|
|
|
|
settings =
|
|
|
|
|
|
defaultSettings ++ Seq(
|
|
|
|
|
|
publishArtifact := false,
|
|
|
|
|
|
scalacOptions in Compile += "-language:_"
|
|
|
|
|
|
)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val httpMarshallersScala = Project(
|
|
|
|
|
|
id = "akka-http-marshallers-scala-experimental",
|
|
|
|
|
|
base = file("akka-http-marshallers-scala"),
|
|
|
|
|
|
settings = parentSettings
|
|
|
|
|
|
).aggregate(httpSprayJson, httpXml)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val httpXml =
|
|
|
|
|
|
httpMarshallersScalaSubproject("xml")
|
|
|
|
|
|
|
|
|
|
|
|
lazy val httpSprayJson =
|
|
|
|
|
|
httpMarshallersScalaSubproject("spray-json")
|
|
|
|
|
|
.settings(Dependencies.httpSprayJson)
|
|
|
|
|
|
.settings(OSGi.httpSprayJson: _*)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val httpMarshallersJava = Project(
|
|
|
|
|
|
id = "akka-http-marshallers-java-experimental",
|
|
|
|
|
|
base = file("akka-http-marshallers-java"),
|
|
|
|
|
|
settings = defaultSettings ++ parentSettings
|
|
|
|
|
|
).aggregate(httpJackson)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val httpJackson =
|
|
|
|
|
|
httpMarshallersJavaSubproject("jackson")
|
|
|
|
|
|
|
|
|
|
|
|
def httpMarshallersScalaSubproject(name: String) =
|
|
|
|
|
|
Project(
|
|
|
|
|
|
id = s"akka-http-$name-experimental",
|
|
|
|
|
|
base = file(s"akka-http-marshallers-scala/akka-http-$name"),
|
|
|
|
|
|
dependencies = Seq(http),
|
|
|
|
|
|
settings = defaultSettings
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
def httpMarshallersJavaSubproject(name: String) =
|
|
|
|
|
|
Project(
|
|
|
|
|
|
id = s"akka-http-$name-experimental",
|
|
|
|
|
|
base = file(s"akka-http-marshallers-java/akka-http-$name"),
|
|
|
|
|
|
dependencies = Seq(http),
|
|
|
|
|
|
settings = defaultSettings
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val httpTestsJava8 = Project(
|
|
|
|
|
|
id = "akka-http-tests-java8-experimental",
|
|
|
|
|
|
base = file("akka-http-tests-java8"),
|
|
|
|
|
|
dependencies = Seq(http, httpJackson, httpTestkit % "test"),
|
|
|
|
|
|
settings =
|
|
|
|
|
|
defaultSettings ++
|
|
|
|
|
|
Seq(
|
|
|
|
|
|
publishArtifact := false,
|
|
|
|
|
|
Dependencies.httpTestsJava8,
|
|
|
|
|
|
fork in run := true,
|
|
|
|
|
|
connectInput := true,
|
|
|
|
|
|
javacOptions in compile := Seq("-source", "8"),
|
|
|
|
|
|
fork in Test := true,
|
|
|
|
|
|
// test discovery is broken when sbt isn't run with a Java 8 compatible JVM, so we define a single
|
|
|
|
|
|
// Suite where all tests need to be registered
|
|
|
|
|
|
definedTests in Test := {
|
|
|
|
|
|
def pseudoJUnitRunWithFingerprint =
|
|
|
|
|
|
// we emulate a junit-interface fingerprint here which cannot be accessed statically
|
|
|
|
|
|
new sbt.testing.AnnotatedFingerprint {
|
|
|
|
|
|
def annotationName = "org.junit.runner.RunWith"
|
|
|
|
|
|
def isModule = false
|
|
|
|
|
|
}
|
|
|
|
|
|
Seq(new TestDefinition("AllJavaTests", pseudoJUnitRunWithFingerprint, false, Array.empty))
|
|
|
|
|
|
},
|
|
|
|
|
|
// don't ignore Suites which is the default for the junit-interface
|
|
|
|
|
|
testOptions += Tests.Argument(TestFrameworks.JUnit, "--ignore-runners="),
|
|
|
|
|
|
mainClass in run in Test := Some("akka.http.javadsl.SimpleServerApp")
|
|
|
|
|
|
)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val macroParadise = Seq(
|
|
|
|
|
|
DependencyHelpers.versionDependentDeps(
|
|
|
|
|
|
Dependencies.Compile.scalaReflect % "provided"
|
|
|
|
|
|
),
|
|
|
|
|
|
addCompilerPlugin("org.scalamacros" % "paradise" % "2.0.1" cross CrossVersion.full)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val parsing = Project(
|
|
|
|
|
|
id = "akka-parsing-experimental",
|
|
|
|
|
|
base = file("akka-parsing"),
|
|
|
|
|
|
settings = defaultSettings ++ OSGi.parsing ++ macroParadise ++ Seq(
|
|
|
|
|
|
scalacOptions += "-language:_",
|
|
|
|
|
|
// ScalaDoc doesn't like the macros
|
|
|
|
|
|
sources in doc in Compile := List()
|
|
|
|
|
|
)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val stream = Project(
|
|
|
|
|
|
id = "akka-stream-experimental",
|
|
|
|
|
|
base = file("akka-stream"),
|
|
|
|
|
|
dependencies = Seq(actor),
|
|
|
|
|
|
settings = defaultSettings ++ experimentalSettings
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val streamTests = Project(
|
|
|
|
|
|
id = "akka-stream-tests-experimental",
|
|
|
|
|
|
base = file("akka-stream-tests"),
|
|
|
|
|
|
dependencies = Seq(streamTestkit % "test->test", stream),
|
|
|
|
|
|
settings = defaultSettings ++ experimentalSettings
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
lazy val streamTestsTck = Project(
|
|
|
|
|
|
id = "akka-stream-tck-experimental",
|
|
|
|
|
|
base = file("akka-stream-tck"),
|
|
|
|
|
|
dependencies = Seq(streamTestkit % "test->test", stream),
|
|
|
|
|
|
settings = defaultSettings ++ experimentalSettings
|
|
|
|
|
|
)
|
|
|
|
|
|
|
2011-12-14 16:19:16 +13:00
|
|
|
|
lazy val kernel = Project(
|
|
|
|
|
|
id = "akka-kernel",
|
|
|
|
|
|
base = file("akka-kernel"),
|
2014-05-12 16:19:29 +02:00
|
|
|
|
dependencies = Seq(actor, testkit % "test->test")
|
2011-12-14 16:19:16 +13:00
|
|
|
|
)
|
2012-04-24 10:19:36 +02:00
|
|
|
|
|
2012-01-19 14:38:44 +00:00
|
|
|
|
lazy val camel = Project(
|
2013-05-08 09:42:25 +02:00
|
|
|
|
id = "akka-camel",
|
|
|
|
|
|
base = file("akka-camel"),
|
2014-05-12 16:19:29 +02:00
|
|
|
|
dependencies = Seq(actor, slf4j, testkit % "test->test")
|
2012-01-19 14:38:44 +00:00
|
|
|
|
)
|
2011-07-04 19:16:43 +12:00
|
|
|
|
|
2012-05-29 12:41:09 +02:00
|
|
|
|
lazy val osgi = Project(
|
|
|
|
|
|
id = "akka-osgi",
|
|
|
|
|
|
base = file("akka-osgi"),
|
2014-05-12 16:19:29 +02:00
|
|
|
|
dependencies = Seq(actor)
|
2012-06-26 22:07:57 +02:00
|
|
|
|
)
|
|
|
|
|
|
|
2014-05-12 16:19:29 +02:00
|
|
|
|
lazy val docs = Project(
|
|
|
|
|
|
id = "akka-docs",
|
|
|
|
|
|
base = file("akka-docs"),
|
|
|
|
|
|
dependencies = Seq(actor, testkit % "test->test",
|
2014-12-12 11:49:32 -06:00
|
|
|
|
remote % "compile;test->test", cluster, clusterMetrics, slf4j, agent, camel, osgi,
|
2015-06-08 12:26:19 +02:00
|
|
|
|
persistence % "compile;provided->provided;test->test", persistenceTck, persistenceQuery,
|
2015-05-17 12:28:47 +02:00
|
|
|
|
typed % "compile;test->test", distributedData)
|
add akka-typed project with generic ActorRef
This is the first step towards more type-safety in Actor interactions,
comprising:
* generic ActorRef[T] that only accepts T messages
* generic ActorSystem[T] extends ActorRef[T] (sending to the guardian,
whose Props[T] are provided for ActorSystem construction)
* removed the Actor trait: everything in there has been made into
messages and signals
* new Behavior[T] abstraction that consumes messages (of type T) or
Signals (lifecycle hooks, Terminated, ReceiveTimeout, Failed),
producing the next Behavior[T] as the result each time
* the ask pattern is provided and yields properly typed Futures
* variants of ActorContext are provided for synchronous testing of
Behaviors
All of this is implemented without touching code outside akka-typed
(apart from making guardianProps configurable), creating wrapper objects
around ActorRef, ActorContext, ActorSystem, Props and providing an Actor
implementation that just runs a Behavior.
2015-01-28 20:45:21 +01:00
|
|
|
|
)
|
2014-05-12 16:19:29 +02:00
|
|
|
|
|
|
|
|
|
|
lazy val contrib = Project(
|
|
|
|
|
|
id = "akka-contrib",
|
|
|
|
|
|
base = file("akka-contrib"),
|
2015-04-27 14:25:10 +02:00
|
|
|
|
dependencies = Seq(remote, remoteTests % "test->test", cluster, clusterTools, persistence % "compile;test->provided")
|
2014-05-12 16:19:29 +02:00
|
|
|
|
) configs (MultiJvm)
|
|
|
|
|
|
|
2014-11-13 18:56:02 +02:00
|
|
|
|
lazy val samples = Project(
|
|
|
|
|
|
id = "akka-samples",
|
|
|
|
|
|
base = file("akka-samples"),
|
|
|
|
|
|
settings = parentSettings ++ ActivatorDist.settings,
|
2015-01-22 14:23:35 +01:00
|
|
|
|
// FIXME osgiDiningHakkersSampleMavenTest temporarily removed from aggregate due to #16703
|
2015-05-21 09:48:49 +03:00
|
|
|
|
aggregate = if (!Sample.CliOptions.aggregateSamples) Nil else
|
2015-05-05 16:44:49 +02:00
|
|
|
|
Seq(sampleCamelJava, sampleCamelScala, sampleClusterJava, sampleClusterScala, sampleFsmScala, sampleFsmJavaLambda,
|
|
|
|
|
|
sampleMainJava, sampleMainScala, sampleMainJavaLambda, sampleMultiNodeScala,
|
|
|
|
|
|
samplePersistenceJava, samplePersistenceScala, samplePersistenceJavaLambda,
|
2015-06-29 21:18:39 +02:00
|
|
|
|
sampleRemoteJava, sampleRemoteScala, sampleSupervisionJavaLambda,
|
2015-07-01 09:46:58 +02:00
|
|
|
|
sampleDistributedDataScala, sampleDistributedDataJava)
|
2014-11-13 18:56:02 +02:00
|
|
|
|
)
|
2014-04-25 16:32:43 +02:00
|
|
|
|
|
2014-11-13 18:56:02 +02:00
|
|
|
|
lazy val sampleCamelJava = Sample.project("akka-sample-camel-java")
|
|
|
|
|
|
lazy val sampleCamelScala = Sample.project("akka-sample-camel-scala")
|
2014-04-25 16:32:43 +02:00
|
|
|
|
|
2014-11-13 18:56:02 +02:00
|
|
|
|
lazy val sampleClusterJava = Sample.project("akka-sample-cluster-java")
|
|
|
|
|
|
lazy val sampleClusterScala = Sample.project("akka-sample-cluster-scala")
|
2012-08-16 14:48:15 +02:00
|
|
|
|
|
2014-11-13 18:56:02 +02:00
|
|
|
|
lazy val sampleFsmScala = Sample.project("akka-sample-fsm-scala")
|
2015-05-05 16:44:49 +02:00
|
|
|
|
lazy val sampleFsmJavaLambda = Sample.project("akka-sample-fsm-java-lambda")
|
2013-02-06 15:54:58 +01:00
|
|
|
|
|
2014-11-13 18:56:02 +02:00
|
|
|
|
lazy val sampleMainJava = Sample.project("akka-sample-main-java")
|
|
|
|
|
|
lazy val sampleMainScala = Sample.project("akka-sample-main-scala")
|
2015-05-05 16:44:49 +02:00
|
|
|
|
lazy val sampleMainJavaLambda = Sample.project("akka-sample-main-java-lambda")
|
2014-11-13 18:56:02 +02:00
|
|
|
|
|
|
|
|
|
|
lazy val sampleMultiNodeScala = Sample.project("akka-sample-multi-node-scala")
|
|
|
|
|
|
|
|
|
|
|
|
lazy val samplePersistenceJava = Sample.project("akka-sample-persistence-java")
|
|
|
|
|
|
lazy val samplePersistenceScala = Sample.project("akka-sample-persistence-scala")
|
2015-05-05 16:44:49 +02:00
|
|
|
|
lazy val samplePersistenceJavaLambda = Sample.project("akka-sample-persistence-java-lambda")
|
2014-11-13 18:56:02 +02:00
|
|
|
|
|
|
|
|
|
|
lazy val sampleRemoteJava = Sample.project("akka-sample-remote-java")
|
|
|
|
|
|
lazy val sampleRemoteScala = Sample.project("akka-sample-remote-scala")
|
2015-05-21 09:48:49 +03:00
|
|
|
|
|
2015-05-05 16:44:49 +02:00
|
|
|
|
lazy val sampleSupervisionJavaLambda = Sample.project("akka-sample-supervision-java-lambda")
|
2015-08-20 13:24:39 +03:00
|
|
|
|
|
2015-06-29 21:18:39 +02:00
|
|
|
|
lazy val sampleDistributedDataScala = Sample.project("akka-sample-distributed-data-scala")
|
2015-07-01 09:46:58 +02:00
|
|
|
|
lazy val sampleDistributedDataJava = Sample.project("akka-sample-distributed-data-java")
|
2014-11-13 18:56:02 +02:00
|
|
|
|
|
|
|
|
|
|
lazy val osgiDiningHakkersSampleMavenTest = Project(id = "akka-sample-osgi-dining-hakkers-maven-test",
|
|
|
|
|
|
base = file("akka-samples/akka-sample-osgi-dining-hakkers-maven-test"),
|
|
|
|
|
|
settings = Seq(
|
|
|
|
|
|
publishArtifact := false,
|
|
|
|
|
|
// force publication of artifacts to local maven repo, so latest versions can be used when running maven tests
|
|
|
|
|
|
compile in Compile <<=
|
|
|
|
|
|
(publishM2 in actor, publishM2 in testkit, publishM2 in remote, publishM2 in cluster, publishM2 in osgi,
|
|
|
|
|
|
publishM2 in slf4j, publishM2 in persistence, compile in Compile) map
|
|
|
|
|
|
((_, _, _, _, _, _, _, c) => c),
|
|
|
|
|
|
test in Test ~= { x => {
|
|
|
|
|
|
def executeMvnCommands(failureMessage: String, commands: String*) = {
|
|
|
|
|
|
if ({List("sh", "-c", commands.mkString("cd akka-samples/akka-sample-osgi-dining-hakkers; mvn ", " ", "")) !} != 0)
|
|
|
|
|
|
throw new Exception(failureMessage)
|
|
|
|
|
|
}
|
|
|
|
|
|
executeMvnCommands("Osgi sample Dining hakkers test failed", "clean", "install")
|
|
|
|
|
|
}}
|
2015-07-01 12:19:20 +02:00
|
|
|
|
) ++ dontPublishSettings
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
val dontPublishSettings = Seq(
|
|
|
|
|
|
publishSigned := (),
|
|
|
|
|
|
publish := ()
|
2013-05-29 16:47:20 +02:00
|
|
|
|
)
|
|
|
|
|
|
|
2012-09-19 15:04:27 +02:00
|
|
|
|
override lazy val settings =
|
|
|
|
|
|
super.settings ++
|
|
|
|
|
|
buildSettings ++
|
|
|
|
|
|
Seq(
|
2012-10-15 20:26:13 +02:00
|
|
|
|
shellPrompt := { s => Project.extract(s).currentProject.id + " > " }
|
2013-12-03 09:18:26 +01:00
|
|
|
|
) ++
|
|
|
|
|
|
resolverSettings
|
2011-07-08 18:01:19 +12:00
|
|
|
|
|
2014-11-30 15:34:59 +02:00
|
|
|
|
lazy val baseSettings = Defaults.defaultSettings
|
2011-07-08 18:01:19 +12:00
|
|
|
|
|
|
|
|
|
|
lazy val parentSettings = baseSettings ++ Seq(
|
2015-01-22 20:26:34 +02:00
|
|
|
|
publishArtifact := false
|
2015-07-01 12:19:20 +02:00
|
|
|
|
) ++ dontPublishSettings
|
2011-07-04 19:16:43 +12:00
|
|
|
|
|
2012-09-27 15:57:46 +02:00
|
|
|
|
lazy val experimentalSettings = Seq(
|
|
|
|
|
|
description := """|This module of Akka is marked as
|
|
|
|
|
|
|experimental, which means that it is in early
|
|
|
|
|
|
|access mode, which also means that it is not covered
|
|
|
|
|
|
|by commercial support. An experimental module doesn't
|
|
|
|
|
|
|have to obey the rule of staying binary compatible
|
|
|
|
|
|
|between minor releases. Breaking API changes may be
|
|
|
|
|
|
|introduced in minor releases without notice as we
|
|
|
|
|
|
|refine and simplify based on your feedback. An
|
|
|
|
|
|
|experimental module may be dropped in major releases
|
|
|
|
|
|
|without prior deprecation.
|
|
|
|
|
|
|""".stripMargin
|
|
|
|
|
|
)
|
|
|
|
|
|
|
2014-02-06 08:56:08 +01:00
|
|
|
|
val (mavenLocalResolver, mavenLocalResolverSettings) =
|
|
|
|
|
|
System.getProperty("akka.build.M2Dir") match {
|
|
|
|
|
|
case null => (Resolver.mavenLocal, Seq.empty)
|
|
|
|
|
|
case path =>
|
|
|
|
|
|
// Maven resolver settings
|
|
|
|
|
|
val resolver = Resolver.file("user-publish-m2-local", new File(path))
|
|
|
|
|
|
(resolver, Seq(
|
|
|
|
|
|
otherResolvers := resolver:: publishTo.value.toList,
|
|
|
|
|
|
publishM2Configuration := Classpaths.publishConfig(packagedArtifacts.value, None, resolverName = resolver.name, checksums = checksums.in(publishM2).value, logging = ivyLoggingLevel.value)
|
|
|
|
|
|
))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-03 09:18:26 +01:00
|
|
|
|
lazy val resolverSettings = {
|
|
|
|
|
|
// should we be allowed to use artifacts published to the local maven repository
|
|
|
|
|
|
if(System.getProperty("akka.build.useLocalMavenResolver", "false").toBoolean)
|
2014-02-06 08:56:08 +01:00
|
|
|
|
Seq(resolvers += mavenLocalResolver)
|
2013-12-03 09:18:26 +01:00
|
|
|
|
else Seq.empty
|
|
|
|
|
|
} ++ {
|
|
|
|
|
|
// should we be allowed to use artifacts from sonatype snapshots
|
|
|
|
|
|
if(System.getProperty("akka.build.useSnapshotSonatypeResolver", "false").toBoolean)
|
|
|
|
|
|
Seq(resolvers += Resolver.sonatypeRepo("snapshots"))
|
|
|
|
|
|
else Seq.empty
|
2014-02-28 10:12:29 +01:00
|
|
|
|
} ++ Seq(
|
|
|
|
|
|
pomIncludeRepository := (_ => false) // do not leak internal repositories during staging
|
|
|
|
|
|
)
|
2013-12-03 09:18:26 +01:00
|
|
|
|
|
2015-01-30 18:34:03 +01:00
|
|
|
|
private def allWarnings: Boolean = System.getProperty("akka.allwarnings", "false").toBoolean
|
2015-01-30 11:33:33 +01:00
|
|
|
|
|
2015-05-21 09:48:49 +03:00
|
|
|
|
lazy val defaultSettings = resolverSettings ++ TestExtras.Filter.settings ++
|
2013-09-13 11:47:32 +02:00
|
|
|
|
Protobuf.settings ++ Seq(
|
2011-07-04 19:16:43 +12:00
|
|
|
|
// compile options
|
2015-05-05 16:44:49 +02:00
|
|
|
|
scalacOptions in Compile ++= Seq("-encoding", "UTF-8", "-target:jvm-1.8", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint"),
|
2015-01-30 18:34:03 +01:00
|
|
|
|
scalacOptions in Compile ++= (if (allWarnings) Seq("-deprecation") else Nil),
|
2015-05-20 09:00:21 +02:00
|
|
|
|
scalacOptions in Test := (scalacOptions in Test).value.filterNot(opt =>
|
|
|
|
|
|
opt == "-Xlog-reflective-calls" || opt.contains("genjavadoc")),
|
2015-01-30 16:05:36 +01:00
|
|
|
|
// -XDignore.symbol.file suppresses sun.misc.Unsafe warnings
|
2015-05-05 16:44:49 +02:00
|
|
|
|
javacOptions in compile ++= Seq("-encoding", "UTF-8", "-source", "1.8", "-target", "1.8", "-Xlint:unchecked", "-XDignore.symbol.file"),
|
2015-01-30 18:34:03 +01:00
|
|
|
|
javacOptions in compile ++= (if (allWarnings) Seq("-Xlint:deprecation") else Nil),
|
2015-05-15 16:53:24 +02:00
|
|
|
|
javacOptions in doc ++= Seq("-encoding", "UTF-8", "-source", "1.8"),
|
2014-03-07 13:15:17 +01:00
|
|
|
|
incOptions := incOptions.value.withNameHashing(true),
|
2011-07-04 19:16:43 +12:00
|
|
|
|
|
2012-12-21 14:53:05 +01:00
|
|
|
|
crossVersion := CrossVersion.binary,
|
2012-08-22 15:52:32 +02:00
|
|
|
|
|
2012-01-12 13:45:53 +01:00
|
|
|
|
ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet,
|
|
|
|
|
|
|
2013-11-27 10:50:41 +01:00
|
|
|
|
licenses := Seq(("Apache License, Version 2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))),
|
|
|
|
|
|
homepage := Some(url("http://akka.io/")),
|
2012-09-24 11:52:02 +02:00
|
|
|
|
|
2013-03-06 09:44:34 +01:00
|
|
|
|
initialCommands :=
|
|
|
|
|
|
"""|import language.postfixOps
|
|
|
|
|
|
|import akka.actor._
|
|
|
|
|
|
|import ActorDSL._
|
|
|
|
|
|
|import scala.concurrent._
|
|
|
|
|
|
|import com.typesafe.config.ConfigFactory
|
|
|
|
|
|
|import scala.concurrent.duration._
|
|
|
|
|
|
|import akka.util.Timeout
|
2013-03-07 19:59:59 +01:00
|
|
|
|
|var config = ConfigFactory.parseString("akka.stdout-loglevel=INFO,akka.loglevel=DEBUG,pinned{type=PinnedDispatcher,executor=thread-pool-executor,throughput=1000}")
|
|
|
|
|
|
|var remoteConfig = ConfigFactory.parseString("akka.remote.netty{port=0,use-dispatcher-for-io=akka.actor.default-dispatcher,execution-pool-size=0},akka.actor.provider=akka.remote.RemoteActorRefProvider").withFallback(config)
|
2013-03-06 09:44:34 +01:00
|
|
|
|
|var system: ActorSystem = null
|
|
|
|
|
|
|implicit def _system = system
|
2014-08-25 15:49:28 +02:00
|
|
|
|
|def startSystem(remoting: Boolean = false) { system = ActorSystem("repl", if(remoting) remoteConfig else config); println("don’t forget to system.terminate()!") }
|
2013-03-06 09:44:34 +01:00
|
|
|
|
|implicit def ec = system.dispatcher
|
|
|
|
|
|
|implicit val timeout = Timeout(5 seconds)
|
|
|
|
|
|
|""".stripMargin,
|
|
|
|
|
|
|
2012-09-24 11:52:02 +02:00
|
|
|
|
/**
|
|
|
|
|
|
* Test settings
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2015-05-05 19:39:56 +02:00
|
|
|
|
parallelExecution in Test := System.getProperty("akka.parallelExecution", parallelExecutionByDefault.toString).toBoolean,
|
2012-07-03 11:19:40 +02:00
|
|
|
|
logBuffered in Test := System.getProperty("akka.logBufferedTests", "false").toBoolean,
|
2011-07-14 14:10:37 +12:00
|
|
|
|
|
2012-06-26 11:58:04 +02:00
|
|
|
|
// show full stack traces and test case durations
|
2013-08-27 16:17:22 +02:00
|
|
|
|
testOptions in Test += Tests.Argument("-oDF"),
|
|
|
|
|
|
|
2013-10-18 14:13:23 +02:00
|
|
|
|
// don't save test output to a file
|
2014-03-07 13:43:05 +01:00
|
|
|
|
testListeners in (Test, test) := Seq(TestLogger(streams.value.log, {_ => streams.value.log }, logBuffered.value)),
|
2014-04-25 16:32:43 +02:00
|
|
|
|
|
2014-05-12 16:19:29 +02:00
|
|
|
|
// -v Log "test run started" / "test started" / "test run finished" events on log level "info" instead of "debug".
|
|
|
|
|
|
// -a Show stack traces and exception class name for AssertionErrors.
|
2015-01-22 20:26:34 +02:00
|
|
|
|
testOptions += Tests.Argument(TestFrameworks.JUnit, "-v", "-a")
|
2014-05-05 16:45:48 +02:00
|
|
|
|
) ++
|
|
|
|
|
|
mavenLocalResolverSettings ++
|
2016-01-12 13:45:18 +01:00
|
|
|
|
JUnitFileReporting.settings
|
2011-07-08 12:53:36 +12:00
|
|
|
|
|
2015-10-23 09:10:25 +03:00
|
|
|
|
def akkaPreviousArtifacts(id: String): Def.Initialize[Set[sbt.ModuleID]] = Def.setting {
|
2013-08-27 16:17:22 +02:00
|
|
|
|
if (enableMiMa) {
|
2015-10-23 09:10:25 +03:00
|
|
|
|
val versions = {
|
|
|
|
|
|
val akka23Versions = Seq("2.3.11", "2.3.12", "2.3.13", "2.3.14")
|
|
|
|
|
|
val akka24Versions = Seq("2.4.0")
|
|
|
|
|
|
val akka24NewArtifacts = Seq(
|
|
|
|
|
|
"akka-cluster-sharding",
|
|
|
|
|
|
"akka-cluster-tools",
|
|
|
|
|
|
"akka-persistence",
|
|
|
|
|
|
"akka-distributed-data-experimental",
|
|
|
|
|
|
"akka-persistence-query-experimental"
|
|
|
|
|
|
)
|
|
|
|
|
|
scalaBinaryVersion.value match {
|
|
|
|
|
|
case "2.11" if !akka24NewArtifacts.contains(id) => akka23Versions ++ akka24Versions
|
|
|
|
|
|
case _ => akka24Versions // Only Akka 2.4.x for scala > than 2.11
|
|
|
|
|
|
}
|
2014-10-28 15:13:13 +02:00
|
|
|
|
}
|
2015-10-23 09:10:25 +03:00
|
|
|
|
|
|
|
|
|
|
// check against all binary compatible artifacts
|
|
|
|
|
|
versions.map(organization.value %% id % _).toSet
|
2013-08-27 16:17:22 +02:00
|
|
|
|
}
|
2015-10-23 09:10:25 +03:00
|
|
|
|
else Set.empty
|
2014-10-28 15:13:13 +02:00
|
|
|
|
}
|
2012-08-13 19:23:43 +02:00
|
|
|
|
|
2016-01-12 13:45:18 +01:00
|
|
|
|
def akkaStreamAndHttpPreviousArtifacts(id: String): Def.Initialize[Set[sbt.ModuleID]] = Def.setting {
|
|
|
|
|
|
// TODO fix MiMa for 2.4 Akka streams
|
|
|
|
|
|
Set.empty
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2012-12-18 12:10:59 +01:00
|
|
|
|
def loadSystemProperties(fileName: String): Unit = {
|
|
|
|
|
|
import scala.collection.JavaConverters._
|
|
|
|
|
|
val file = new File(fileName)
|
|
|
|
|
|
if (file.exists()) {
|
|
|
|
|
|
println("Loading system properties from file `" + fileName + "`")
|
|
|
|
|
|
val in = new InputStreamReader(new FileInputStream(file), "UTF-8")
|
|
|
|
|
|
val props = new Properties
|
|
|
|
|
|
props.load(in)
|
|
|
|
|
|
in.close()
|
|
|
|
|
|
sys.props ++ props.asScala
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2011-07-04 19:16:43 +12:00
|
|
|
|
}
|