No more sbt.Build, all projects in build.sbt (one issue outstanding though)
This commit is contained in:
parent
5400f92050
commit
5006c223d9
3 changed files with 176 additions and 261 deletions
171
build.sbt
171
build.sbt
|
|
@ -1,2 +1,173 @@
|
|||
enablePlugins(akka.UnidocRoot, akka.TimeStampede, akka.UnidocWithPrValidation)
|
||||
disablePlugins(MimaPlugin)
|
||||
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm
|
||||
import com.typesafe.tools.mima.plugin.MimaPlugin
|
||||
import akka.AkkaBuild._
|
||||
|
||||
initialize := {
|
||||
System.setProperty("akka.mode", "test") // Is there better place for this? (and more importantly, what is it?)
|
||||
// Load system properties from a file to make configuration from Jenkins easier
|
||||
loadSystemProperties("project/akka-build.properties")
|
||||
initialize.value
|
||||
}
|
||||
|
||||
akka.AkkaBuild.buildSettings
|
||||
shellPrompt := { s => Project.extract(s).currentProject.id + " > " }
|
||||
resolverSettings
|
||||
|
||||
lazy val aggregatedProjects: Seq[ProjectReference] = Seq(
|
||||
actor, actorTests,
|
||||
agent,
|
||||
benchJmh,
|
||||
camel,
|
||||
cluster, clusterMetrics, clusterSharding, clusterTools,
|
||||
contrib,
|
||||
distributedData,
|
||||
docs,
|
||||
multiNodeTestkit,
|
||||
osgi,
|
||||
persistence, persistenceQuery, persistenceShared, persistenceTck,
|
||||
protobuf,
|
||||
remote, remoteTests,
|
||||
slf4j,
|
||||
stream, streamTestkit, streamTests, streamTestsTck,
|
||||
testkit,
|
||||
typed, typedTests, typedTestkit
|
||||
)
|
||||
|
||||
lazy val root = Project(
|
||||
id = "akka",
|
||||
base = file("."),
|
||||
aggregate = aggregatedProjects
|
||||
).settings(rootSettings: _*)
|
||||
|
||||
lazy val akkaScalaNightly = akkaModule("akka-scala-nightly")
|
||||
// remove dependencies that we have to build ourselves (Scala STM)
|
||||
.aggregate(aggregatedProjects diff List[ProjectReference](agent, docs): _*)
|
||||
.disablePlugins(ValidatePullRequest, MimaPlugin)
|
||||
|
||||
lazy val actor = akkaModule("akka-actor")
|
||||
|
||||
lazy val testkit = akkaModule("akka-testkit")
|
||||
.dependsOn(actor)
|
||||
|
||||
lazy val typed = akkaModule("akka-typed")
|
||||
.dependsOn(testkit % "compile->compile;test->test")
|
||||
|
||||
lazy val typedTests = akkaModule("akka-typed-tests")
|
||||
.dependsOn(typed, typedTestkit % "compile->compile;test->test")
|
||||
|
||||
lazy val typedTestkit = akkaModule("akka-typed-testkit")
|
||||
.dependsOn(typed, testkit % "compile->compile;test->test")
|
||||
|
||||
lazy val actorTests = akkaModule("akka-actor-tests")
|
||||
.dependsOn(testkit % "compile->compile;test->test")
|
||||
|
||||
lazy val benchJmh = akkaModule("akka-bench-jmh")
|
||||
.dependsOn(
|
||||
Seq(
|
||||
actor,
|
||||
stream, streamTests,
|
||||
persistence, distributedData,
|
||||
testkit
|
||||
).map(_ % "compile->compile;compile->test;provided->provided"): _*
|
||||
).disablePlugins(ValidatePullRequest)
|
||||
|
||||
lazy val protobuf = akkaModule("akka-protobuf")
|
||||
|
||||
lazy val remote = akkaModule("akka-remote")
|
||||
.dependsOn(actor, stream, actorTests % "test->test", testkit % "test->test", streamTestkit % "test", protobuf)
|
||||
|
||||
lazy val multiNodeTestkit = akkaModule("akka-multi-node-testkit")
|
||||
.dependsOn(remote, testkit)
|
||||
|
||||
lazy val remoteTests = akkaModule("akka-remote-tests")
|
||||
.dependsOn(actorTests % "test->test", remote % "test->test", streamTestkit % "test", multiNodeTestkit)
|
||||
.configs(MultiJvm)
|
||||
|
||||
lazy val cluster = akkaModule("akka-cluster")
|
||||
.dependsOn(remote, remoteTests % "test->test" , testkit % "test->test")
|
||||
.configs(MultiJvm)
|
||||
|
||||
lazy val clusterMetrics = akkaModule("akka-cluster-metrics")
|
||||
.dependsOn(cluster % "compile->compile;test->test;multi-jvm->multi-jvm", slf4j % "test->compile")
|
||||
.configs(MultiJvm)
|
||||
|
||||
lazy val clusterTools = akkaModule("akka-cluster-tools")
|
||||
.dependsOn(cluster % "compile->compile;test->test;multi-jvm->multi-jvm")
|
||||
.configs(MultiJvm)
|
||||
|
||||
lazy val clusterSharding = akkaModule("akka-cluster-sharding")
|
||||
// TODO akka-persistence 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.
|
||||
.dependsOn(
|
||||
cluster % "compile->compile;test->test;multi-jvm->multi-jvm",
|
||||
distributedData,
|
||||
persistence % "compile->compile;test->provided",
|
||||
clusterTools)
|
||||
.configs(MultiJvm)
|
||||
|
||||
lazy val distributedData = akkaModule("akka-distributed-data")
|
||||
.dependsOn(cluster % "compile->compile;test->test;multi-jvm->multi-jvm")
|
||||
.configs(MultiJvm)
|
||||
|
||||
lazy val slf4j = akkaModule("akka-slf4j")
|
||||
.dependsOn(actor, testkit % "test->test")
|
||||
|
||||
lazy val agent = akkaModule("akka-agent")
|
||||
.dependsOn(actor, testkit % "test->test")
|
||||
|
||||
lazy val persistence = akkaModule("akka-persistence")
|
||||
.dependsOn(actor, testkit % "test->test", protobuf)
|
||||
|
||||
lazy val persistenceQuery = akkaModule("akka-persistence-query")
|
||||
.dependsOn(
|
||||
stream,
|
||||
persistence % "compile->compile;provided->provided;test->test",
|
||||
streamTestkit % "test")
|
||||
|
||||
lazy val persistenceTck = akkaModule("akka-persistence-tck")
|
||||
.dependsOn(persistence % "compile->compile;provided->provided;test->test", testkit % "compile->compile;test->test")
|
||||
|
||||
lazy val persistenceShared = akkaModule("akka-persistence-shared")
|
||||
.dependsOn(persistence % "test->test", testkit % "test->test", remote % "test", protobuf)
|
||||
|
||||
lazy val stream = akkaModule("akka-stream")
|
||||
.dependsOn(actor)
|
||||
|
||||
lazy val streamTestkit = akkaModule("akka-stream-testkit")
|
||||
.dependsOn(stream, testkit % "compile->compile;test->test")
|
||||
|
||||
lazy val streamTests = akkaModule("akka-stream-tests")
|
||||
.dependsOn(streamTestkit % "test->test", stream)
|
||||
|
||||
lazy val streamTestsTck = akkaModule("akka-stream-tests-tck")
|
||||
.dependsOn(streamTestkit % "test->test", stream)
|
||||
|
||||
lazy val camel = akkaModule("akka-camel")
|
||||
.dependsOn(actor, slf4j, testkit % "test->test")
|
||||
|
||||
lazy val osgi = akkaModule("akka-osgi")
|
||||
.dependsOn(actor)
|
||||
|
||||
lazy val docs = akkaModule("akka-docs")
|
||||
.dependsOn(
|
||||
actor, cluster, clusterMetrics, slf4j, agent, camel, osgi, persistenceTck, persistenceQuery, distributedData, stream,
|
||||
clusterTools % "compile->compile;test->test",
|
||||
testkit % "compile->compile;test->test",
|
||||
remote % "compile->compile;test->test",
|
||||
persistence % "compile->compile;provided->provided;test->test",
|
||||
typed % "compile->compile;test->test",
|
||||
typedTests % "compile->compile;test->test",
|
||||
streamTestkit % "compile->compile;test->test"
|
||||
)
|
||||
|
||||
lazy val contrib = akkaModule("akka-contrib")
|
||||
.dependsOn(remote, remoteTests % "test->test", cluster, clusterTools, persistence % "compile->compile;test->provided")
|
||||
.configs(MultiJvm)
|
||||
|
||||
def akkaModule(name: String): Project =
|
||||
Project(id = name, base = file(name))
|
||||
.settings(akka.AkkaBuild.buildSettings)
|
||||
|
|
@ -8,17 +8,11 @@ import java.io.{FileInputStream, InputStreamReader}
|
|||
import java.util.Properties
|
||||
|
||||
import akka.TestExtras.JUnitFileReporting
|
||||
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm
|
||||
import com.typesafe.sbt.pgp.PgpKeys.publishSigned
|
||||
import com.typesafe.tools.mima.plugin.MimaPlugin
|
||||
import sbt.Keys._
|
||||
import sbt.{TestResult, _}
|
||||
|
||||
object AkkaBuild extends Build {
|
||||
System.setProperty("akka.mode", "test") // Is there better place for this?
|
||||
|
||||
// Load system properties from a file to make configuration from Jenkins easier
|
||||
loadSystemProperties("project/akka-build.properties")
|
||||
object AkkaBuild {
|
||||
|
||||
val enableMiMa = true
|
||||
|
||||
|
|
@ -35,252 +29,6 @@ object AkkaBuild extends Build {
|
|||
parallelExecution in GlobalScope := System.getProperty("akka.parallelExecution", parallelExecutionByDefault.toString).toBoolean
|
||||
)
|
||||
|
||||
lazy val aggregatedProjects: Seq[ProjectReference] = Seq(
|
||||
actor,
|
||||
actorTests,
|
||||
agent,
|
||||
benchJmh,
|
||||
camel,
|
||||
cluster,
|
||||
clusterMetrics,
|
||||
clusterSharding,
|
||||
clusterTools,
|
||||
contrib,
|
||||
distributedData,
|
||||
docs,
|
||||
multiNodeTestkit,
|
||||
osgi,
|
||||
persistence,
|
||||
persistenceQuery,
|
||||
persistenceShared,
|
||||
persistenceTck,
|
||||
protobuf,
|
||||
remote,
|
||||
remoteTests,
|
||||
slf4j,
|
||||
stream,
|
||||
streamTestkit,
|
||||
streamTests,
|
||||
streamTestsTck,
|
||||
testkit,
|
||||
typed,
|
||||
typedTests,
|
||||
typedTestkit
|
||||
)
|
||||
|
||||
lazy val root = Project(
|
||||
id = "akka",
|
||||
base = file("."),
|
||||
aggregate = aggregatedProjects
|
||||
).settings(rootSettings: _*)
|
||||
|
||||
lazy val akkaScalaNightly = Project(
|
||||
id = "akka-scala-nightly",
|
||||
base = file("akka-scala-nightly"),
|
||||
// remove dependencies that we have to build ourselves (Scala STM)
|
||||
aggregate = aggregatedProjects diff List[ProjectReference](agent, docs)
|
||||
).disablePlugins(ValidatePullRequest, MimaPlugin)
|
||||
|
||||
lazy val actor = Project(
|
||||
id = "akka-actor",
|
||||
base = file("akka-actor")
|
||||
)
|
||||
|
||||
lazy val testkit = Project(
|
||||
id = "akka-testkit",
|
||||
base = file("akka-testkit"),
|
||||
dependencies = Seq(actor)
|
||||
)
|
||||
|
||||
lazy val actorTests = Project(
|
||||
id = "akka-actor-tests",
|
||||
base = file("akka-actor-tests"),
|
||||
dependencies = Seq(testkit % "compile;test->test")
|
||||
)
|
||||
|
||||
lazy val typed = Project(
|
||||
id = "akka-typed",
|
||||
base = file("akka-typed"),
|
||||
dependencies = Seq(actor)
|
||||
)
|
||||
|
||||
lazy val typedTestkit = Project(
|
||||
id = "akka-typed-testkit",
|
||||
base = file("akka-typed-testkit"),
|
||||
dependencies = Seq(typed, testkit % "compile;test->test")
|
||||
)
|
||||
|
||||
lazy val typedTests = Project(
|
||||
id = "akka-typed-tests",
|
||||
base = file("akka-typed-tests"),
|
||||
dependencies = Seq(typedTestkit % "compile;test->test")
|
||||
)
|
||||
|
||||
lazy val benchJmh = Project(
|
||||
id = "akka-bench-jmh",
|
||||
base = file("akka-bench-jmh"),
|
||||
dependencies = Seq(
|
||||
actor,
|
||||
stream, streamTests,
|
||||
persistence, distributedData,
|
||||
testkit
|
||||
).map(_ % "compile;compile->test;provided->provided")
|
||||
).disablePlugins(ValidatePullRequest)
|
||||
|
||||
lazy val protobuf = Project(
|
||||
id = "akka-protobuf",
|
||||
base = file("akka-protobuf")
|
||||
)
|
||||
|
||||
lazy val remote = Project(
|
||||
id = "akka-remote",
|
||||
base = file("akka-remote"),
|
||||
dependencies = Seq(actor, stream, actorTests % "test->test", testkit % "test->test", streamTestkit % "test", protobuf)
|
||||
)
|
||||
|
||||
lazy val multiNodeTestkit = Project(
|
||||
id = "akka-multi-node-testkit",
|
||||
base = file("akka-multi-node-testkit"),
|
||||
dependencies = Seq(remote, testkit)
|
||||
)
|
||||
|
||||
lazy val remoteTests = Project(
|
||||
id = "akka-remote-tests",
|
||||
base = file("akka-remote-tests"),
|
||||
dependencies = Seq(actorTests % "test->test", remote % "test->test", streamTestkit % "test", multiNodeTestkit)
|
||||
).configs(MultiJvm)
|
||||
|
||||
lazy val cluster = Project(
|
||||
id = "akka-cluster",
|
||||
base = file("akka-cluster"),
|
||||
dependencies = Seq(remote, remoteTests % "test->test" , testkit % "test->test")
|
||||
).configs(MultiJvm)
|
||||
|
||||
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)
|
||||
|
||||
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)
|
||||
|
||||
lazy val clusterSharding = Project(
|
||||
id = "akka-cluster-sharding",
|
||||
base = file("akka-cluster-sharding"),
|
||||
// TODO akka-persistence 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.
|
||||
dependencies = Seq(cluster % "compile->compile;test->test;multi-jvm->multi-jvm",
|
||||
distributedData, persistence % "compile;test->provided", clusterTools)
|
||||
).configs(MultiJvm)
|
||||
|
||||
lazy val distributedData = Project(
|
||||
id = "akka-distributed-data",
|
||||
base = file("akka-distributed-data"),
|
||||
dependencies = Seq(cluster % "compile->compile;test->test;multi-jvm->multi-jvm")
|
||||
).configs(MultiJvm)
|
||||
|
||||
lazy val slf4j = Project(
|
||||
id = "akka-slf4j",
|
||||
base = file("akka-slf4j"),
|
||||
dependencies = Seq(actor, testkit % "test->test")
|
||||
)
|
||||
|
||||
lazy val agent = Project(
|
||||
id = "akka-agent",
|
||||
base = file("akka-agent"),
|
||||
dependencies = Seq(actor, testkit % "test->test")
|
||||
)
|
||||
|
||||
lazy val persistence = Project(
|
||||
id = "akka-persistence",
|
||||
base = file("akka-persistence"),
|
||||
dependencies = Seq(actor, testkit % "test->test", protobuf)
|
||||
)
|
||||
|
||||
lazy val persistenceQuery = Project(
|
||||
id = "akka-persistence-query",
|
||||
base = file("akka-persistence-query"),
|
||||
dependencies = Seq(
|
||||
stream,
|
||||
persistence % "compile;provided->provided;test->test",
|
||||
streamTestkit % "test")
|
||||
)
|
||||
|
||||
lazy val persistenceTck = Project(
|
||||
id = "akka-persistence-tck",
|
||||
base = file("akka-persistence-tck"),
|
||||
dependencies = Seq(persistence % "compile;provided->provided;test->test", testkit % "compile;test->test")
|
||||
)
|
||||
|
||||
lazy val persistenceShared = Project(
|
||||
id = "akka-persistence-shared",
|
||||
base = file("akka-persistence-shared"),
|
||||
dependencies = Seq(persistence % "test->test", testkit % "test->test", remote % "test", protobuf)
|
||||
)
|
||||
|
||||
lazy val stream = Project(
|
||||
id = "akka-stream",
|
||||
base = file("akka-stream"),
|
||||
dependencies = Seq(actor)
|
||||
)
|
||||
|
||||
lazy val streamTestkit = Project(
|
||||
id = "akka-stream-testkit",
|
||||
base = file("akka-stream-testkit"),
|
||||
dependencies = Seq(stream, testkit % "compile;test->test")
|
||||
)
|
||||
|
||||
lazy val streamTests = Project(
|
||||
id = "akka-stream-tests",
|
||||
base = file("akka-stream-tests"),
|
||||
dependencies = Seq(streamTestkit % "test->test", stream)
|
||||
)
|
||||
|
||||
lazy val streamTestsTck = Project(
|
||||
id = "akka-stream-tests-tck",
|
||||
base = file("akka-stream-tests-tck"),
|
||||
dependencies = Seq(streamTestkit % "test->test", stream)
|
||||
)
|
||||
|
||||
lazy val camel = Project(
|
||||
id = "akka-camel",
|
||||
base = file("akka-camel"),
|
||||
dependencies = Seq(actor, slf4j, testkit % "test->test")
|
||||
)
|
||||
|
||||
lazy val osgi = Project(
|
||||
id = "akka-osgi",
|
||||
base = file("akka-osgi"),
|
||||
dependencies = Seq(actor)
|
||||
)
|
||||
|
||||
lazy val docs = Project(
|
||||
id = "akka-docs",
|
||||
base = file("akka-docs"),
|
||||
dependencies = Seq(
|
||||
actor, cluster, clusterMetrics, slf4j, agent, camel, osgi, persistenceTck, persistenceQuery, distributedData, stream,
|
||||
clusterTools % "compile;test->test",
|
||||
testkit % "compile;test->test",
|
||||
remote % "compile;test->test",
|
||||
persistence % "compile;provided->provided;test->test",
|
||||
typed % "compile;test->test",
|
||||
typedTests % "compile;test->test",
|
||||
streamTestkit % "compile;test->test"
|
||||
)
|
||||
)
|
||||
|
||||
lazy val contrib = Project(
|
||||
id = "akka-contrib",
|
||||
base = file("akka-contrib"),
|
||||
dependencies = Seq(remote, remoteTests % "test->test", cluster, clusterTools, persistence % "compile;test->provided")
|
||||
).configs(MultiJvm)
|
||||
|
||||
val dontPublishSettings = Seq(
|
||||
publishSigned := (),
|
||||
publish := (),
|
||||
|
|
@ -291,13 +39,6 @@ object AkkaBuild extends Build {
|
|||
sources in doc in Compile := List()
|
||||
)
|
||||
|
||||
override lazy val settings =
|
||||
super.settings ++
|
||||
buildSettings ++
|
||||
Seq(
|
||||
shellPrompt := { s => Project.extract(s).currentProject.id + " > " }
|
||||
) ++
|
||||
resolverSettings
|
||||
|
||||
lazy val parentSettings = Seq(
|
||||
publishArtifact := false
|
||||
|
|
|
|||
|
|
@ -120,7 +120,10 @@ object UnidocRoot extends AutoPlugin {
|
|||
|
||||
override lazy val projectSettings =
|
||||
CliOptions.genjavadocEnabled.ifTrue(scalaJavaUnidocSettings).getOrElse(scalaUnidocSettings) ++
|
||||
settings(Seq(), Seq(AkkaBuild.remoteTests, AkkaBuild.benchJmh, AkkaBuild.protobuf, AkkaBuild.akkaScalaNightly, AkkaBuild.docs))
|
||||
// TODO These should be excluded, but I haven't figured out how to exclude them without having the project
|
||||
// reference available anymore (since the Project's are in build.sbt now)
|
||||
// AkkaBuild.remoteTests, AkkaBuild.benchJmh, AkkaBuild.protobuf, AkkaBuild.akkaScalaNightly, AkkaBuild.docs))
|
||||
settings(Seq(), Seq())
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue