* replaced Defaults.coreDefaultSettings and Project.defaultSettings to *.coreDefaultSettings * replaced 'settings = ' inside 'Project(...)' to 'Project(...).settings'
49 lines
2.1 KiB
Scala
49 lines
2.1 KiB
Scala
import com.typesafe.sbt.SbtMultiJvm
|
|
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm
|
|
|
|
val akkaVersion = "2.4-SNAPSHOT"
|
|
|
|
val project = Project(
|
|
id = "akka-sample-distributed-data-scala",
|
|
base = file(".")
|
|
)
|
|
.settings(SbtMultiJvm.multiJvmSettings: _*)
|
|
.settings(
|
|
name := "akka-sample-distributed-data-scala",
|
|
version := "2.4-SNAPSHOT",
|
|
scalaVersion := "2.11.7",
|
|
scalacOptions in Compile ++= Seq("-encoding", "UTF-8", "-target:jvm-1.8", "-deprecation", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint"),
|
|
javacOptions in Compile ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint:unchecked", "-Xlint:deprecation"),
|
|
libraryDependencies ++= Seq(
|
|
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
|
|
"com.typesafe.akka" %% "akka-remote" % akkaVersion,
|
|
"com.typesafe.akka" %% "akka-cluster" % akkaVersion,
|
|
"com.typesafe.akka" %% "akka-distributed-data-experimental" % akkaVersion,
|
|
"com.typesafe.akka" %% "akka-multi-node-testkit" % akkaVersion,
|
|
"org.scalatest" %% "scalatest" % "2.2.1" % "test"),
|
|
javaOptions in run ++= Seq(
|
|
"-Xms128m", "-Xmx1024m"),
|
|
Keys.fork in run := true,
|
|
// make sure that MultiJvm test are compiled by the default test compilation
|
|
compile in MultiJvm <<= (compile in MultiJvm) triggeredBy (compile in Test),
|
|
// disable parallel tests
|
|
parallelExecution in Test := false,
|
|
// make sure that MultiJvm tests are executed by the default test target,
|
|
// and combine the results from ordinary test and multi-jvm tests
|
|
executeTests in Test <<= (executeTests in Test, executeTests in MultiJvm) map {
|
|
case (testResults, multiNodeResults) =>
|
|
val overall =
|
|
if (testResults.overall.id < multiNodeResults.overall.id)
|
|
multiNodeResults.overall
|
|
else
|
|
testResults.overall
|
|
Tests.Output(overall,
|
|
testResults.events ++ multiNodeResults.events,
|
|
testResults.summaries ++ multiNodeResults.summaries)
|
|
},
|
|
licenses := Seq(("CC0", url("http://creativecommons.org/publicdomain/zero/1.0")))
|
|
)
|
|
.configs (MultiJvm)
|
|
|
|
|
|
fork in run := true
|