=pro run multi-jvm tests when validating pr
* addunidoc task via an AutoPlugin that depends on PrValidation and Unidoc autoplugins * separate cli option logic to a case class * remove autoplugin for root project
This commit is contained in:
parent
ba8756d485
commit
7fc2790458
34 changed files with 291 additions and 275 deletions
|
|
@ -1,11 +1,9 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, Unidoc }
|
import akka.{ AkkaBuild, Dependencies, Formatting }
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
publishArtifact in Compile := false
|
publishArtifact in Compile := false
|
||||||
|
|
||||||
Dependencies.actorTests
|
Dependencies.actorTests
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,10 @@
|
||||||
import akka.{ AkkaBuild, Formatting, OSGi, Unidoc, Dependencies }
|
import akka.{ AkkaBuild, Formatting, OSGi, Dependencies }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
OSGi.actor
|
OSGi.actor
|
||||||
|
|
||||||
Dependencies.actor
|
Dependencies.actor
|
||||||
|
|
@ -16,4 +12,3 @@ Dependencies.actor
|
||||||
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-actor").value
|
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-actor").value
|
||||||
|
|
||||||
spray.boilerplate.BoilerplatePlugin.Boilerplate.settings
|
spray.boilerplate.BoilerplatePlugin.Boilerplate.settings
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,14 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, Unidoc }
|
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, ScaladocNoVerificationOfDiagrams }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettingsNoVerificationOfDiagrams
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
OSGi.agent
|
OSGi.agent
|
||||||
|
|
||||||
Dependencies.agent
|
Dependencies.agent
|
||||||
|
|
||||||
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-agent").value
|
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-agent").value
|
||||||
|
|
||||||
|
enablePlugins(ScaladocNoVerificationOfDiagrams)
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
enablePlugins(JmhPlugin)
|
enablePlugins(JmhPlugin)
|
||||||
|
disablePlugins(Unidoc)
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,10 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, Unidoc }
|
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
OSGi.camel
|
OSGi.camel
|
||||||
|
|
||||||
Dependencies.camel
|
Dependencies.camel
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, MultiNode, Unidoc, SigarLoader }
|
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, MultiNodeScalaTest, SigarLoader }
|
||||||
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys._
|
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys._
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
|
|
@ -6,12 +6,6 @@ AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
MultiNode.multiJvmSettings
|
|
||||||
|
|
||||||
SigarLoader.sigarSettings
|
SigarLoader.sigarSettings
|
||||||
|
|
||||||
OSGi.clusterMetrics
|
OSGi.clusterMetrics
|
||||||
|
|
@ -22,8 +16,4 @@ Dependencies.clusterMetrics
|
||||||
|
|
||||||
parallelExecution in Test := false
|
parallelExecution in Test := false
|
||||||
|
|
||||||
extraOptions in MultiJvm <<= (sourceDirectory in MultiJvm) { src =>
|
enablePlugins(MultiNodeScalaTest)
|
||||||
(name: String) => (src ** (name + ".conf")).get.headOption.map("-Dakka.config=" + _.absolutePath).toSeq
|
|
||||||
}
|
|
||||||
|
|
||||||
scalatestOptions in MultiJvm := MultiNode.defaultMultiJvmScalatestOptions.value
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,14 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, MultiNode, Unidoc, OSGi }
|
import akka.{ AkkaBuild, Dependencies, Formatting, MultiNode, ScaladocNoVerificationOfDiagrams, OSGi }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettingsNoVerificationOfDiagrams
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
OSGi.clusterSharding
|
OSGi.clusterSharding
|
||||||
|
|
||||||
MultiNode.multiJvmSettings
|
|
||||||
|
|
||||||
Dependencies.clusterSharding
|
Dependencies.clusterSharding
|
||||||
|
|
||||||
//MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-sharding").value
|
//MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-sharding").value
|
||||||
|
|
||||||
|
enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams)
|
||||||
|
|
|
||||||
|
|
@ -231,4 +231,3 @@ class ClusterShardingCustomShardAllocationSpec extends MultiNodeSpec(ClusterShar
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,14 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, MultiNode, Unidoc, OSGi }
|
import akka.{ AkkaBuild, Dependencies, Formatting, MultiNode, ScaladocNoVerificationOfDiagrams, OSGi }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettingsNoVerificationOfDiagrams
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
OSGi.clusterTools
|
OSGi.clusterTools
|
||||||
|
|
||||||
MultiNode.multiJvmSettings
|
|
||||||
|
|
||||||
Dependencies.clusterTools
|
Dependencies.clusterTools
|
||||||
|
|
||||||
//MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-tools").value
|
//MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster-tools").value
|
||||||
|
|
||||||
|
enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, MultiNode, Unidoc }
|
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, MultiNodeScalaTest }
|
||||||
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys._
|
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys._
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
|
|
@ -6,12 +6,6 @@ AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
MultiNode.multiJvmSettings
|
|
||||||
|
|
||||||
OSGi.cluster
|
OSGi.cluster
|
||||||
|
|
||||||
Dependencies.cluster
|
Dependencies.cluster
|
||||||
|
|
@ -21,8 +15,4 @@ MimaKeys.previousArtifact := akkaPreviousArtifact("akka-cluster").value
|
||||||
// disable parallel tests
|
// disable parallel tests
|
||||||
parallelExecution in Test := false
|
parallelExecution in Test := false
|
||||||
|
|
||||||
extraOptions in MultiJvm <<= (sourceDirectory in MultiJvm) { src =>
|
enablePlugins(MultiNodeScalaTest)
|
||||||
(name: String) => (src ** (name + ".conf")).get.headOption.map("-Dakka.config=" + _.absolutePath).toSeq
|
|
||||||
}
|
|
||||||
|
|
||||||
scalatestOptions in MultiJvm := MultiNode.defaultMultiJvmScalatestOptions.value
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,10 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, MultiNode, Unidoc }
|
import akka.{ AkkaBuild, Dependencies, Formatting, MultiNode, ScaladocNoVerificationOfDiagrams }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettingsNoVerificationOfDiagrams
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
MultiNode.multiJvmSettings
|
|
||||||
|
|
||||||
Dependencies.contrib
|
Dependencies.contrib
|
||||||
|
|
||||||
MimaKeys.reportBinaryIssues := () // disable bin comp check
|
MimaKeys.reportBinaryIssues := () // disable bin comp check
|
||||||
|
|
@ -25,3 +19,5 @@ description := """|
|
||||||
|without prior deprecation. The Typesafe subscription does not cover
|
|without prior deprecation. The Typesafe subscription does not cover
|
||||||
|support for these modules.
|
|support for these modules.
|
||||||
|""".stripMargin
|
|""".stripMargin
|
||||||
|
|
||||||
|
enablePlugins(MultiNode, ScaladocNoVerificationOfDiagrams)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, SphinxDoc }
|
import akka.{ AkkaBuild, Dependencies, Formatting, SphinxDoc }
|
||||||
|
import akka.ValidatePullRequest._
|
||||||
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
|
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
|
||||||
import com.typesafe.sbt.SbtSite.site
|
import com.typesafe.sbt.SbtSite.site
|
||||||
|
import com.typesafe.sbt.site.SphinxSupport._
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
@ -24,3 +26,5 @@ publishArtifact in Compile := false
|
||||||
unmanagedSourceDirectories in ScalariformKeys.format in Test <<= unmanagedSourceDirectories in Test
|
unmanagedSourceDirectories in ScalariformKeys.format in Test <<= unmanagedSourceDirectories in Test
|
||||||
|
|
||||||
MimaKeys.reportBinaryIssues := () // disable bin comp check
|
MimaKeys.reportBinaryIssues := () // disable bin comp check
|
||||||
|
|
||||||
|
additionalTasks in ValidatePR += generate in Sphinx
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, Unidoc }
|
import akka.{ AkkaBuild, Dependencies, Formatting, ScaladocNoVerificationOfDiagrams }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettingsNoVerificationOfDiagrams
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
Dependencies.kernel
|
Dependencies.kernel
|
||||||
|
|
||||||
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-kernel").value
|
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-kernel").value
|
||||||
|
|
||||||
|
enablePlugins(ScaladocNoVerificationOfDiagrams)
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,8 @@
|
||||||
import akka.{AkkaBuild, Formatting, Unidoc, OSGi}
|
import akka.{AkkaBuild, Formatting, OSGi}
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-multi-node-testkit").value
|
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-multi-node-testkit").value
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,10 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, Unidoc }
|
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
OSGi.osgi
|
OSGi.osgi
|
||||||
|
|
||||||
Dependencies.osgi
|
Dependencies.osgi
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, Unidoc }
|
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
import akka.MultiNode
|
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
|
|
@ -8,10 +7,6 @@ AkkaBuild.experimentalSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
// OSGi.persistenceTck TODO: we do need to export this as OSGi bundle too?
|
// OSGi.persistenceTck TODO: we do need to export this as OSGi bundle too?
|
||||||
|
|
||||||
Dependencies.persistenceTck
|
Dependencies.persistenceTck
|
||||||
|
|
@ -19,5 +14,3 @@ Dependencies.persistenceTck
|
||||||
MimaKeys.previousArtifact := None
|
MimaKeys.previousArtifact := None
|
||||||
|
|
||||||
fork in Test := true
|
fork in Test := true
|
||||||
|
|
||||||
javaOptions in Test := MultiNode.defaultMultiJvmOptions
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, Unidoc }
|
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
import akka.MultiNode
|
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
|
|
@ -8,10 +7,6 @@ AkkaBuild.experimentalSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
OSGi.persistence
|
OSGi.persistence
|
||||||
|
|
||||||
Dependencies.persistence
|
Dependencies.persistence
|
||||||
|
|
@ -19,7 +14,3 @@ Dependencies.persistence
|
||||||
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-persistence-experimental").value
|
MimaKeys.previousArtifact := akkaPreviousArtifact("akka-persistence-experimental").value
|
||||||
|
|
||||||
fork in Test := true
|
fork in Test := true
|
||||||
|
|
||||||
javaOptions in Test := MultiNode.defaultMultiJvmOptions
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, MultiNode, Unidoc }
|
import akka.{ AkkaBuild, Dependencies, Formatting, MultiNodeScalaTest, Unidoc }
|
||||||
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys._
|
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys._
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
|
|
@ -6,21 +6,13 @@ AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
MultiNode.multiJvmSettings
|
|
||||||
|
|
||||||
Dependencies.remoteTests
|
Dependencies.remoteTests
|
||||||
|
|
||||||
// disable parallel tests
|
// disable parallel tests
|
||||||
parallelExecution in Test := false
|
parallelExecution in Test := false
|
||||||
|
|
||||||
extraOptions in MultiJvm <<= (sourceDirectory in MultiJvm) { src =>
|
|
||||||
(name: String) => (src ** (name + ".conf")).get.headOption.map("-Dakka.config=" + _.absolutePath).toSeq
|
|
||||||
}
|
|
||||||
|
|
||||||
scalatestOptions in MultiJvm := MultiNode.defaultMultiJvmScalatestOptions.value
|
|
||||||
|
|
||||||
publishArtifact in Compile := false
|
publishArtifact in Compile := false
|
||||||
|
|
||||||
MimaKeys.reportBinaryIssues := () // disable bin comp check
|
MimaKeys.reportBinaryIssues := () // disable bin comp check
|
||||||
|
|
||||||
|
enablePlugins(MultiNodeScalaTest)
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,10 @@
|
||||||
import akka.{AkkaBuild, Dependencies, Formatting, Unidoc, OSGi}
|
import akka.{AkkaBuild, Dependencies, Formatting, OSGi}
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
OSGi.remote
|
OSGi.remote
|
||||||
|
|
||||||
Dependencies.remote
|
Dependencies.remote
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,10 @@
|
||||||
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, Unidoc }
|
import akka.{ AkkaBuild, Dependencies, Formatting, OSGi }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
OSGi.slf4j
|
OSGi.slf4j
|
||||||
|
|
||||||
Dependencies.slf4j
|
Dependencies.slf4j
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,10 @@
|
||||||
import akka.{ AkkaBuild, Formatting, OSGi, Unidoc, Dependencies }
|
import akka.{ AkkaBuild, Formatting, OSGi, Dependencies }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
OSGi.testkit
|
OSGi.testkit
|
||||||
|
|
||||||
// to fix scaladoc generation
|
// to fix scaladoc generation
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import akka.{ AkkaBuild, Formatting, OSGi, Unidoc, Dependencies }
|
import akka.{ AkkaBuild, Formatting, OSGi, Dependencies }
|
||||||
import com.typesafe.tools.mima.plugin.MimaKeys
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
||||||
|
|
||||||
AkkaBuild.defaultSettings
|
AkkaBuild.defaultSettings
|
||||||
|
|
@ -6,8 +6,3 @@ AkkaBuild.defaultSettings
|
||||||
AkkaBuild.experimentalSettings
|
AkkaBuild.experimentalSettings
|
||||||
|
|
||||||
Formatting.formatSettings
|
Formatting.formatSettings
|
||||||
|
|
||||||
Unidoc.scaladocSettings
|
|
||||||
|
|
||||||
Unidoc.javadocSettings
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
enablePlugins(akka.RootSettings)
|
enablePlugins(akka.UnidocRoot, akka.TimeStampede, akka.UnidocWithPrValidation)
|
||||||
|
|
||||||
net.virtualvoid.sbt.graph.Plugin.graphSettings
|
net.virtualvoid.sbt.graph.Plugin.graphSettings
|
||||||
|
|
@ -11,8 +11,6 @@ import java.util.Properties
|
||||||
import akka.TestExtras.GraphiteBuildEvents
|
import akka.TestExtras.GraphiteBuildEvents
|
||||||
import akka.TestExtras.JUnitFileReporting
|
import akka.TestExtras.JUnitFileReporting
|
||||||
import akka.TestExtras.StatsDMetrics
|
import akka.TestExtras.StatsDMetrics
|
||||||
import akka.Unidoc.scaladocSettings
|
|
||||||
import akka.Unidoc.unidocSettings
|
|
||||||
import com.typesafe.sbt.S3Plugin.S3
|
import com.typesafe.sbt.S3Plugin.S3
|
||||||
import com.typesafe.sbt.S3Plugin.s3Settings
|
import com.typesafe.sbt.S3Plugin.s3Settings
|
||||||
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm
|
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm
|
||||||
|
|
@ -39,9 +37,9 @@ object AkkaBuild extends Build {
|
||||||
lazy val root = Project(
|
lazy val root = Project(
|
||||||
id = "akka",
|
id = "akka",
|
||||||
base = file("."),
|
base = file("."),
|
||||||
settings = parentSettings ++ Release.settings ++ unidocSettings ++
|
settings = parentSettings ++ Release.settings ++
|
||||||
SphinxDoc.akkaSettings ++ Dist.settings ++ s3Settings ++ scaladocSettings ++
|
SphinxDoc.akkaSettings ++ Dist.settings ++ s3Settings ++
|
||||||
GraphiteBuildEvents.settings ++ Protobuf.settings ++ Unidoc.settings(Seq(samples), Seq(remoteTests)) ++ Seq(
|
GraphiteBuildEvents.settings ++ Protobuf.settings ++ Seq(
|
||||||
parallelExecution in GlobalScope := System.getProperty("akka.parallelExecution", parallelExecutionByDefault.toString).toBoolean,
|
parallelExecution in GlobalScope := System.getProperty("akka.parallelExecution", parallelExecutionByDefault.toString).toBoolean,
|
||||||
Dist.distExclude := Seq(actorTests.id, docs.id, samples.id, osgi.id),
|
Dist.distExclude := Seq(actorTests.id, docs.id, samples.id, osgi.id),
|
||||||
|
|
||||||
|
|
@ -200,7 +198,7 @@ object AkkaBuild extends Build {
|
||||||
base = file("akka-samples"),
|
base = file("akka-samples"),
|
||||||
settings = parentSettings ++ ActivatorDist.settings,
|
settings = parentSettings ++ ActivatorDist.settings,
|
||||||
// FIXME osgiDiningHakkersSampleMavenTest temporarily removed from aggregate due to #16703
|
// FIXME osgiDiningHakkersSampleMavenTest temporarily removed from aggregate due to #16703
|
||||||
aggregate = if (!CommandLineOptions.aggregateSamples) Nil else
|
aggregate = if (!Sample.CliOptions.aggregateSamples) Nil else
|
||||||
Seq(sampleCamelJava, sampleCamelScala, sampleClusterJava, sampleClusterScala, sampleFsmScala, sampleFsmJavaLambda,
|
Seq(sampleCamelJava, sampleCamelScala, sampleClusterJava, sampleClusterScala, sampleFsmScala, sampleFsmJavaLambda,
|
||||||
sampleMainJava, sampleMainScala, sampleMainJavaLambda, sampleMultiNodeScala,
|
sampleMainJava, sampleMainScala, sampleMainJavaLambda, sampleMultiNodeScala,
|
||||||
samplePersistenceJava, samplePersistenceScala, samplePersistenceJavaLambda,
|
samplePersistenceJava, samplePersistenceScala, samplePersistenceJavaLambda,
|
||||||
|
|
@ -306,7 +304,7 @@ object AkkaBuild extends Build {
|
||||||
|
|
||||||
private def allWarnings: Boolean = System.getProperty("akka.allwarnings", "false").toBoolean
|
private def allWarnings: Boolean = System.getProperty("akka.allwarnings", "false").toBoolean
|
||||||
|
|
||||||
lazy val defaultSettings = baseSettings ++ resolverSettings ++ TestExtras.Filter.settings ++
|
lazy val defaultSettings = resolverSettings ++ TestExtras.Filter.settings ++
|
||||||
Protobuf.settings ++ Seq(
|
Protobuf.settings ++ Seq(
|
||||||
// compile options
|
// compile options
|
||||||
scalacOptions in Compile ++= Seq("-encoding", "UTF-8", "-target:jvm-1.8", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint"),
|
scalacOptions in Compile ++= Seq("-encoding", "UTF-8", "-target:jvm-1.8", "-feature", "-unchecked", "-Xlog-reflective-calls", "-Xlint"),
|
||||||
|
|
|
||||||
27
project/CliOptions.scala
Normal file
27
project/CliOptions.scala
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
|
||||||
|
*/
|
||||||
|
package akka
|
||||||
|
|
||||||
|
case class CliOption[T](private val value: T) {
|
||||||
|
def get: T = value
|
||||||
|
}
|
||||||
|
|
||||||
|
object CliOption {
|
||||||
|
def apply[T](path: String, default: T)(implicit ev: CliOptionParser[T]): CliOption[T] = ev.parse(path, default)
|
||||||
|
|
||||||
|
implicit class BooleanCliOption(cliOption: CliOption[Boolean]) {
|
||||||
|
def ifTrue[A](a: => A): Option[A] = if (cliOption.get) Some(a) else None
|
||||||
|
}
|
||||||
|
|
||||||
|
trait CliOptionParser[T] {
|
||||||
|
def parse(path: String, default: T): CliOption[T]
|
||||||
|
}
|
||||||
|
|
||||||
|
object CliOptionParser {
|
||||||
|
implicit object BooleanCliOptionParser extends CliOptionParser[Boolean] {
|
||||||
|
def parse(path: String, default: Boolean) =
|
||||||
|
CliOption(sys.props.getOrElse(path, default.toString).toBoolean)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
package akka
|
|
||||||
|
|
||||||
object CommandLineOptions {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Aggregated sample builds are transformed by swapping library dependencies to project ones.
|
|
||||||
* This does work play well with dbuild and breaks scala community build. Therefore it was made
|
|
||||||
* optional.
|
|
||||||
*
|
|
||||||
* Default: true
|
|
||||||
*/
|
|
||||||
val aggregateSamples = sys.props.getOrElse("akka.build.aggregateSamples", "true") == "true"
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
|
||||||
|
*/
|
||||||
package akka
|
package akka
|
||||||
|
|
||||||
import sbt._
|
import sbt._
|
||||||
|
|
@ -7,47 +10,36 @@ import sbt.Keys._
|
||||||
import sbt.File
|
import sbt.File
|
||||||
import scala.annotation.tailrec
|
import scala.annotation.tailrec
|
||||||
|
|
||||||
object Unidoc {
|
object Scaladoc extends AutoPlugin {
|
||||||
|
|
||||||
def settings(ignoreAggregates: Seq[Project], ignoreProjects: Seq[Project]) = {
|
object CliOptions {
|
||||||
val withoutAggregates = ignoreAggregates.foldLeft(inAnyProject) { _ -- inAggregates(_, transitive = true, includeRoot = true) }
|
val scaladocDiagramsEnabled = CliOption("akka.scaladoc.diagrams", true)
|
||||||
val docProjectFilter = ignoreProjects.foldLeft(withoutAggregates) { _ -- inProjects(_) }
|
val scaladocAutoAPI = CliOption("akka.scaladoc.autoapi", true)
|
||||||
|
|
||||||
inTask(unidoc)(Seq(
|
|
||||||
unidocProjectFilter in ScalaUnidoc := docProjectFilter,
|
|
||||||
unidocProjectFilter in JavaUnidoc := docProjectFilter,
|
|
||||||
apiMappings in ScalaUnidoc := (apiMappings in (Compile, doc)).value
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val genjavadocEnabled = sys.props.get("akka.genjavadoc.enabled").getOrElse("false").toBoolean
|
override def trigger = allRequirements
|
||||||
val (unidocSettings, javadocSettings) =
|
override def requires = plugins.JvmPlugin
|
||||||
if (genjavadocEnabled)
|
|
||||||
(scalaJavaUnidocSettings, genjavadocExtraSettings ++ Seq(
|
|
||||||
scalacOptions in Compile += "-P:genjavadoc:fabricateParams=true",
|
|
||||||
unidocGenjavadocVersion in Global := "0.9"))
|
|
||||||
else (scalaUnidocSettings, Nil)
|
|
||||||
|
|
||||||
lazy val scaladocDiagramsEnabled = sys.props.get("akka.scaladoc.diagrams").getOrElse("true").toBoolean
|
val validateDiagrams = settingKey[Boolean]("Validate generated scaladoc diagrams")
|
||||||
lazy val scaladocAutoAPI = sys.props.get("akka.scaladoc.autoapi").getOrElse("true").toBoolean
|
|
||||||
|
|
||||||
def scaladocSettings: Seq[sbt.Setting[_]] = {
|
override lazy val projectSettings = {
|
||||||
scaladocSettingsNoVerificationOfDiagrams ++
|
|
||||||
(if (scaladocDiagramsEnabled) Seq(doc in Compile ~= scaladocVerifier) else Seq.empty)
|
|
||||||
}
|
|
||||||
|
|
||||||
// for projects with few (one) classes there might not be any diagrams
|
|
||||||
def scaladocSettingsNoVerificationOfDiagrams: Seq[sbt.Setting[_]] = {
|
|
||||||
inTask(doc)(Seq(
|
inTask(doc)(Seq(
|
||||||
scalacOptions in Compile <++= (version, baseDirectory in ThisBuild) map scaladocOptions,
|
scalacOptions in Compile <++= (version, baseDirectory in ThisBuild) map scaladocOptions,
|
||||||
autoAPIMappings := scaladocAutoAPI
|
autoAPIMappings := CliOptions.scaladocAutoAPI.get
|
||||||
))
|
)) ++
|
||||||
|
Seq(validateDiagrams in Compile := true) ++
|
||||||
|
CliOptions.scaladocDiagramsEnabled.ifTrue(doc in Compile := {
|
||||||
|
val docs = (doc in Compile).value
|
||||||
|
if ((validateDiagrams in Compile).value)
|
||||||
|
scaladocVerifier(docs)
|
||||||
|
docs
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
def scaladocOptions(ver: String, base: File): List[String] = {
|
def scaladocOptions(ver: String, base: File): List[String] = {
|
||||||
val urlString = GitHub.url(ver) + "/€{FILE_PATH}.scala"
|
val urlString = GitHub.url(ver) + "/€{FILE_PATH}.scala"
|
||||||
val opts = List("-implicits", "-doc-source-url", urlString, "-sourcepath", base.getAbsolutePath)
|
val opts = List("-implicits", "-doc-source-url", urlString, "-sourcepath", base.getAbsolutePath)
|
||||||
if (scaladocDiagramsEnabled) "-diagrams"::opts else opts
|
CliOptions.scaladocDiagramsEnabled.ifTrue("-diagrams").toList ::: opts
|
||||||
}
|
}
|
||||||
|
|
||||||
def scaladocVerifier(file: File): File= {
|
def scaladocVerifier(file: File): File= {
|
||||||
|
|
@ -82,3 +74,59 @@ object Unidoc {
|
||||||
file
|
file
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For projects with few (one) classes there might not be any diagrams.
|
||||||
|
*/
|
||||||
|
object ScaladocNoVerificationOfDiagrams extends AutoPlugin {
|
||||||
|
|
||||||
|
override def trigger = noTrigger
|
||||||
|
override def requires = Scaladoc
|
||||||
|
|
||||||
|
override lazy val projectSettings = Seq(
|
||||||
|
Scaladoc.validateDiagrams in Compile := false
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unidoc settings for root project. Adds unidoc command.
|
||||||
|
*/
|
||||||
|
object UnidocRoot extends AutoPlugin {
|
||||||
|
|
||||||
|
object CliOptions {
|
||||||
|
val genjavadocEnabled = CliOption("akka.genjavadoc.enabled", false)
|
||||||
|
}
|
||||||
|
|
||||||
|
override def trigger = noTrigger
|
||||||
|
|
||||||
|
def settings(ignoreAggregates: Seq[Project], ignoreProjects: Seq[Project]) = {
|
||||||
|
val withoutAggregates = ignoreAggregates.foldLeft(inAnyProject) { _ -- inAggregates(_, transitive = true, includeRoot = true) }
|
||||||
|
val docProjectFilter = ignoreProjects.foldLeft(withoutAggregates) { _ -- inProjects(_) }
|
||||||
|
|
||||||
|
inTask(unidoc)(Seq(
|
||||||
|
unidocProjectFilter in ScalaUnidoc := docProjectFilter,
|
||||||
|
unidocProjectFilter in JavaUnidoc := docProjectFilter,
|
||||||
|
apiMappings in ScalaUnidoc := (apiMappings in (Compile, doc)).value
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
||||||
|
override lazy val projectSettings =
|
||||||
|
CliOptions.genjavadocEnabled.ifTrue(scalaJavaUnidocSettings).getOrElse(scalaUnidocSettings) ++
|
||||||
|
settings(Seq(AkkaBuild.samples), Seq(AkkaBuild.remoteTests, AkkaBuild.benchJmh))
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unidoc settings for every multi-project. Adds genjavadoc specific settings.
|
||||||
|
*/
|
||||||
|
object Unidoc extends AutoPlugin {
|
||||||
|
|
||||||
|
override def trigger = allRequirements
|
||||||
|
override def requires = plugins.JvmPlugin
|
||||||
|
|
||||||
|
override lazy val projectSettings = UnidocRoot.CliOptions.genjavadocEnabled.ifTrue(
|
||||||
|
genjavadocExtraSettings ++ Seq(
|
||||||
|
scalacOptions in Compile += "-P:genjavadoc:fabricateParams=true",
|
||||||
|
unidocGenjavadocVersion in Global := "0.9"
|
||||||
|
)
|
||||||
|
).getOrElse(Seq.empty)
|
||||||
|
}
|
||||||
|
|
@ -1,18 +1,36 @@
|
||||||
|
/**
|
||||||
|
* Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
|
||||||
|
*/
|
||||||
package akka
|
package akka
|
||||||
|
|
||||||
import akka.TestExtras.Filter
|
import akka.TestExtras.Filter
|
||||||
import akka.TestExtras.Filter.Keys._
|
import akka.TestExtras.Filter.Keys._
|
||||||
import com.typesafe.sbt.{SbtScalariform, SbtMultiJvm}
|
import com.typesafe.sbt.{SbtScalariform, SbtMultiJvm}
|
||||||
import sbt._
|
|
||||||
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys._
|
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys._
|
||||||
import sbt.Keys._
|
|
||||||
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
|
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
|
||||||
|
import sbt._
|
||||||
|
import sbt.Keys._
|
||||||
|
|
||||||
object MultiNode {
|
object MultiNode extends AutoPlugin {
|
||||||
|
|
||||||
val multiNodeEnabled = sys.props.get("akka.test.multi-node").getOrElse("false").toBoolean
|
object CliOptions {
|
||||||
|
val multiNode = CliOption("akka.test.multi-node", false)
|
||||||
|
val sbtLogNoFormat = CliOption("sbt.log.noformat", false)
|
||||||
|
|
||||||
lazy val defaultMultiJvmOptions: Seq[String] = {
|
val hostsFileName = sys.props.get("akka.test.multi-node.hostsFileName").toSeq
|
||||||
|
val javaName = sys.props.get("akka.test.multi-node.java").toSeq
|
||||||
|
val targetDirName = sys.props.get("akka.test.multi-node.targetDirName").toSeq
|
||||||
|
}
|
||||||
|
|
||||||
|
val multiExecuteTests = CliOptions.multiNode.ifTrue(multiNodeExecuteTests in MultiJvm).getOrElse(executeTests in MultiJvm)
|
||||||
|
val multiTest = CliOptions.multiNode.ifTrue(multiNodeTest in MultiJvm).getOrElse(test in MultiJvm)
|
||||||
|
|
||||||
|
override def trigger = noTrigger
|
||||||
|
override def requires = plugins.JvmPlugin
|
||||||
|
|
||||||
|
override lazy val projectSettings = multiJvmSettings
|
||||||
|
|
||||||
|
private val defaultMultiJvmOptions: Seq[String] = {
|
||||||
import scala.collection.JavaConverters._
|
import scala.collection.JavaConverters._
|
||||||
// multinode.D= and multinode.X= makes it possible to pass arbitrary
|
// multinode.D= and multinode.X= makes it possible to pass arbitrary
|
||||||
// -D or -X arguments to the forked jvm, e.g.
|
// -D or -X arguments to the forked jvm, e.g.
|
||||||
|
|
@ -27,17 +45,10 @@ object MultiNode {
|
||||||
case key: String if knownPrefix.exists(pre => key.startsWith(pre)) => "-D" + key + "=" + System.getProperty(key)
|
case key: String if knownPrefix.exists(pre => key.startsWith(pre)) => "-D" + key + "=" + System.getProperty(key)
|
||||||
}
|
}
|
||||||
|
|
||||||
"-Xmx256m" :: akkaProperties :::
|
"-Xmx256m" :: akkaProperties ::: CliOptions.sbtLogNoFormat.ifTrue("-Dakka.test.nocolor=true").toList
|
||||||
(if (sys.props.get("sbt.log.noformat").getOrElse("false").toBoolean) List("-Dakka.test.nocolor=true") else Nil)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lazy val defaultMultiJvmScalatestOptions = Def.setting {
|
private val multiJvmSettings =
|
||||||
Seq("-C", "org.scalatest.extra.QuietReporter") ++
|
|
||||||
(if (excludeTestTags.value.isEmpty) Seq.empty else Seq("-l", if (multiNodeEnabled) excludeTestTags.value.mkString("\"", " ", "\"") else excludeTestTags.value.mkString(" "))) ++
|
|
||||||
(if (onlyTestTags.value.isEmpty) Seq.empty else Seq("-n", if (multiNodeEnabled) onlyTestTags.value.mkString("\"", " ", "\"") else onlyTestTags.value.mkString(" ")))
|
|
||||||
}
|
|
||||||
|
|
||||||
lazy val multiJvmSettings =
|
|
||||||
SbtMultiJvm.multiJvmSettings ++
|
SbtMultiJvm.multiJvmSettings ++
|
||||||
inConfig(MultiJvm)(SbtScalariform.configScalariformSettings) ++
|
inConfig(MultiJvm)(SbtScalariform.configScalariformSettings) ++
|
||||||
Seq(
|
Seq(
|
||||||
|
|
@ -46,35 +57,39 @@ object MultiNode {
|
||||||
scalacOptions in MultiJvm <<= scalacOptions in Test,
|
scalacOptions in MultiJvm <<= scalacOptions in Test,
|
||||||
compile in MultiJvm <<= (compile in MultiJvm) triggeredBy (compile in Test)
|
compile in MultiJvm <<= (compile in MultiJvm) triggeredBy (compile in Test)
|
||||||
) ++
|
) ++
|
||||||
Option(System.getProperty("akka.test.multi-node.hostsFileName")).map(x => Seq(multiNodeHostsFileName in MultiJvm := x)).getOrElse(Seq.empty) ++
|
CliOptions.hostsFileName.map(multiNodeHostsFileName in MultiJvm := _) ++
|
||||||
Option(System.getProperty("akka.test.multi-node.java")).map(x => Seq(multiNodeJavaName in MultiJvm := x)).getOrElse(Seq.empty) ++
|
CliOptions.javaName.map(multiNodeJavaName in MultiJvm := _) ++
|
||||||
Option(System.getProperty("akka.test.multi-node.targetDirName")).map(x => Seq(multiNodeTargetDirName in MultiJvm := x)).getOrElse(Seq.empty) ++
|
CliOptions.targetDirName.map(multiNodeTargetDirName in MultiJvm := _) ++
|
||||||
// make sure that MultiJvm tests are executed by the default test target,
|
// make sure that MultiJvm tests are executed by the default test target,
|
||||||
// and combine the results from ordinary test and multi-jvm tests
|
// and combine the results from ordinary test and multi-jvm tests
|
||||||
(if (multiNodeEnabled) {
|
(executeTests in Test <<= (executeTests in Test, multiExecuteTests) map {
|
||||||
executeTests in Test <<= (executeTests in Test, multiNodeExecuteTests in MultiJvm) map {
|
case (testResults, multiNodeResults) =>
|
||||||
case (testResults, multiNodeResults) =>
|
val overall =
|
||||||
val overall =
|
if (testResults.overall.id < multiNodeResults.overall.id)
|
||||||
if (testResults.overall.id < multiNodeResults.overall.id)
|
multiNodeResults.overall
|
||||||
multiNodeResults.overall
|
else
|
||||||
else
|
testResults.overall
|
||||||
testResults.overall
|
Tests.Output(overall,
|
||||||
Tests.Output(overall,
|
testResults.events ++ multiNodeResults.events,
|
||||||
testResults.events ++ multiNodeResults.events,
|
testResults.summaries ++ multiNodeResults.summaries)
|
||||||
testResults.summaries ++ multiNodeResults.summaries)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Additional settings for scalatest.
|
||||||
|
*/
|
||||||
|
object MultiNodeScalaTest extends AutoPlugin {
|
||||||
|
|
||||||
|
override def requires = MultiNode
|
||||||
|
|
||||||
|
override lazy val projectSettings = Seq(
|
||||||
|
extraOptions in MultiJvm <<= (sourceDirectory in MultiJvm) { src =>
|
||||||
|
(name: String) => (src ** (name + ".conf")).get.headOption.map("-Dakka.config=" + _.absolutePath).toSeq
|
||||||
|
},
|
||||||
|
scalatestOptions in MultiJvm := {
|
||||||
|
Seq("-C", "org.scalatest.extra.QuietReporter") ++
|
||||||
|
(if (excludeTestTags.value.isEmpty) Seq.empty else Seq("-l", if (MultiNode.CliOptions.multiNode.get) excludeTestTags.value.mkString("\"", " ", "\"") else excludeTestTags.value.mkString(" "))) ++
|
||||||
|
(if (onlyTestTags.value.isEmpty) Seq.empty else Seq("-n", if (MultiNode.CliOptions.multiNode.get) onlyTestTags.value.mkString("\"", " ", "\"") else onlyTestTags.value.mkString(" ")))
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
|
|
||||||
*/
|
|
||||||
package akka
|
|
||||||
|
|
||||||
import sbt._
|
|
||||||
import sbt.Keys._
|
|
||||||
import akka.ValidatePullRequest.validatePullRequest
|
|
||||||
import sbtunidoc.Plugin.UnidocKeys.unidoc
|
|
||||||
import com.typesafe.sbt.site.SphinxSupport
|
|
||||||
import com.typesafe.sbt.site.SphinxSupport.Sphinx
|
|
||||||
|
|
||||||
object RootSettings extends AutoPlugin {
|
|
||||||
|
|
||||||
lazy val docs = ProjectRef(file("."), "akka-docs")
|
|
||||||
|
|
||||||
// settings for root project goes here
|
|
||||||
override val projectSettings = Seq(
|
|
||||||
validatePullRequest <<= validatePullRequest.dependsOn(unidoc in Compile),
|
|
||||||
validatePullRequest <<= validatePullRequest.dependsOn(SphinxSupport.generate in Sphinx in docs)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -5,6 +5,17 @@ import sbt.Keys._
|
||||||
|
|
||||||
object Sample {
|
object Sample {
|
||||||
|
|
||||||
|
object CliOptions {
|
||||||
|
/**
|
||||||
|
* Aggregated sample builds are transformed by swapping library dependencies to project ones.
|
||||||
|
* This does work play well with dbuild and breaks scala community build. Therefore it was made
|
||||||
|
* optional.
|
||||||
|
*
|
||||||
|
* Default: true
|
||||||
|
*/
|
||||||
|
val aggregateSamples = sys.props.getOrElse("akka.build.aggregateSamples", "true").toBoolean
|
||||||
|
}
|
||||||
|
|
||||||
final val akkaOrganization = "com.typesafe.akka"
|
final val akkaOrganization = "com.typesafe.akka"
|
||||||
|
|
||||||
def buildTransformer = (ti: BuildLoader.TransformInfo) => ti.base.name match {
|
def buildTransformer = (ti: BuildLoader.TransformInfo) => ti.base.name match {
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@ import sbt.Keys._
|
||||||
|
|
||||||
object TimeStampede extends AutoPlugin {
|
object TimeStampede extends AutoPlugin {
|
||||||
|
|
||||||
override def requires = RootSettings
|
override def trigger = noTrigger
|
||||||
override def trigger = allRequirements
|
|
||||||
|
|
||||||
override lazy val projectSettings = Seq(
|
override lazy val projectSettings = Seq(
|
||||||
commands += stampVersion
|
commands += stampVersion
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import com.typesafe.tools.mima.plugin.MimaKeys.reportBinaryIssues
|
||||||
import net.virtualvoid.sbt.graph.IvyGraphMLDependencies
|
import net.virtualvoid.sbt.graph.IvyGraphMLDependencies
|
||||||
import net.virtualvoid.sbt.graph.IvyGraphMLDependencies.ModuleId
|
import net.virtualvoid.sbt.graph.IvyGraphMLDependencies.ModuleId
|
||||||
import org.kohsuke.github._
|
import org.kohsuke.github._
|
||||||
|
import sbtunidoc.Plugin.UnidocKeys.unidoc
|
||||||
import sbt.Keys._
|
import sbt.Keys._
|
||||||
import sbt._
|
import sbt._
|
||||||
|
|
||||||
|
|
@ -16,36 +17,33 @@ import scala.util.matching.Regex
|
||||||
object ValidatePullRequest extends AutoPlugin {
|
object ValidatePullRequest extends AutoPlugin {
|
||||||
|
|
||||||
override def trigger = allRequirements
|
override def trigger = allRequirements
|
||||||
|
|
||||||
override def requires = plugins.JvmPlugin
|
override def requires = plugins.JvmPlugin
|
||||||
|
|
||||||
sealed trait BuildMode {
|
sealed trait BuildMode {
|
||||||
val Zero = Def.task { () } // when you stare into the void, the void stares back at you
|
def task: Option[TaskKey[_]]
|
||||||
def task: Def.Initialize[Task[Unit]]
|
|
||||||
def log(projectName: String, l: Logger): Unit
|
def log(projectName: String, l: Logger): Unit
|
||||||
}
|
}
|
||||||
case object BuildSkip extends BuildMode {
|
case object BuildSkip extends BuildMode {
|
||||||
override def task = Zero
|
override def task = None
|
||||||
def log(projectName: String, l: Logger) =
|
def log(projectName: String, l: Logger) =
|
||||||
l.info(s"Skipping validation of [$projectName], as PR does NOT affect this project...")
|
l.info(s"Skipping validation of [$projectName], as PR does NOT affect this project...")
|
||||||
}
|
}
|
||||||
case object BuildQuick extends BuildMode {
|
case object BuildQuick extends BuildMode {
|
||||||
override def task = Zero.dependsOn(test in ValidatePR)
|
override def task = Some(test in ValidatePR)
|
||||||
def log(projectName: String, l: Logger) =
|
def log(projectName: String, l: Logger) =
|
||||||
l.info(s"Building [$projectName] in quick mode, as it's dependencies were affected by PR.")
|
l.info(s"Building [$projectName] in quick mode, as it's dependencies were affected by PR.")
|
||||||
}
|
}
|
||||||
case object BuildProjectChangedQuick extends BuildMode {
|
case object BuildProjectChangedQuick extends BuildMode {
|
||||||
override def task = Zero.dependsOn(test in ValidatePR)
|
override def task = Some(test in ValidatePR)
|
||||||
def log(projectName: String, l: Logger) =
|
def log(projectName: String, l: Logger) =
|
||||||
l.info(s"Building [$projectName] as the root `project/` directory was affected by this PR.")
|
l.info(s"Building [$projectName] as the root `project/` directory was affected by this PR.")
|
||||||
}
|
}
|
||||||
final case class BuildCommentForcedAll(phrase: String, c: GHIssueComment) extends BuildMode {
|
final case class BuildCommentForcedAll(phrase: String, c: GHIssueComment) extends BuildMode {
|
||||||
override def task = Zero.dependsOn(test in Test)
|
override def task = Some(test in Test)
|
||||||
def log(projectName: String, l: Logger) =
|
def log(projectName: String, l: Logger) =
|
||||||
l.info(s"GitHub PR comment [ ${c.getUrl} ] contains [$phrase], forcing BUILD ALL mode!")
|
l.info(s"GitHub PR comment [ ${c.getUrl} ] contains [$phrase], forcing BUILD ALL mode!")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val ValidatePR = config("pr-validation") extend Test
|
val ValidatePR = config("pr-validation") extend Test
|
||||||
|
|
||||||
override lazy val projectConfigurations = Seq(ValidatePR)
|
override lazy val projectConfigurations = Seq(ValidatePR)
|
||||||
|
|
@ -73,10 +71,11 @@ object ValidatePullRequest extends AutoPlugin {
|
||||||
|
|
||||||
// determining touched dirs and projects
|
// determining touched dirs and projects
|
||||||
val changedDirectories = taskKey[immutable.Set[String]]("List of touched modules in this PR branch")
|
val changedDirectories = taskKey[immutable.Set[String]]("List of touched modules in this PR branch")
|
||||||
val projectBuildMode = taskKey[BuildMode]("True if this project is affected by the PR and should be rebuilt")
|
val projectBuildMode = taskKey[BuildMode]("Determines what will run when this project is affected by the PR and should be rebuilt")
|
||||||
|
|
||||||
// running validation
|
// running validation
|
||||||
val validatePullRequest = taskKey[Unit]("Additional tasks for pull request validation")
|
val validatePullRequest = taskKey[Unit]("Validate pull request")
|
||||||
|
val additionalTasks = taskKey[Seq[TaskKey[_]]]("Additional tasks for pull request validation")
|
||||||
|
|
||||||
def changedDirectoryIsDependency(changedDirs: Set[String],
|
def changedDirectoryIsDependency(changedDirs: Set[String],
|
||||||
target: File,
|
target: File,
|
||||||
|
|
@ -198,15 +197,61 @@ object ValidatePullRequest extends AutoPlugin {
|
||||||
BuildSkip
|
BuildSkip
|
||||||
},
|
},
|
||||||
|
|
||||||
|
additionalTasks in ValidatePR := Seq.empty,
|
||||||
|
|
||||||
validatePullRequest := Def.taskDyn {
|
validatePullRequest := Def.taskDyn {
|
||||||
val log = streams.value.log
|
val log = streams.value.log
|
||||||
val buildMode = (projectBuildMode in ValidatePR).value
|
val buildMode = (projectBuildMode in ValidatePR).value
|
||||||
|
|
||||||
buildMode.log(name.value, log)
|
buildMode.log(name.value, log)
|
||||||
buildMode.task
|
|
||||||
|
val validationTasks = buildMode.task.toSeq ++ (buildMode match {
|
||||||
|
case BuildSkip => Seq.empty // do not run the additional task if project is skipped during pr validation
|
||||||
|
case _ => (additionalTasks in ValidatePR).value
|
||||||
|
})
|
||||||
|
|
||||||
|
// Create a task for every validation task key and
|
||||||
|
// then zip all of the tasks together discarding outputs.
|
||||||
|
// Task failures are propagated as normal.
|
||||||
|
val zero: Def.Initialize[Seq[Task[Any]]] = Def.setting { Seq(task())}
|
||||||
|
validationTasks.map(taskKey => Def.task { taskKey.value } ).foldLeft(zero) { (acc, current) =>
|
||||||
|
acc.zipWith(current) { case (taskSeq, task) =>
|
||||||
|
taskSeq :+ task.asInstanceOf[Task[Any]]
|
||||||
|
}
|
||||||
|
} apply { tasks: Seq[Task[Any]] =>
|
||||||
|
tasks.join map { seq => () /* Ignore the sequence of unit returned */ }
|
||||||
|
}
|
||||||
}.value,
|
}.value,
|
||||||
|
|
||||||
// add reportBinaryIssues to validatePullRequest on minor version maintenance branch
|
// add reportBinaryIssues to validatePullRequest on minor version maintenance branch
|
||||||
validatePullRequest <<= validatePullRequest.dependsOn(reportBinaryIssues)
|
validatePullRequest <<= validatePullRequest.dependsOn(reportBinaryIssues)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This autoplugin adds Multi Jvm tests to validatePullRequest task.
|
||||||
|
* It is needed, because ValidatePullRequest autoplugin does not depend on MultiNode and
|
||||||
|
* therefore test:executeTests is not yet modified to include multi-jvm tests when ValidatePullRequest
|
||||||
|
* build strategy is being determined.
|
||||||
|
*
|
||||||
|
* Making ValidatePullRequest depend on MultiNode is impossible, as then ValidatePullRequest
|
||||||
|
* autoplugin would trigger only on projects which have both of these plugins enabled.
|
||||||
|
*/
|
||||||
|
object MultiNodeWithPrValidation extends AutoPlugin {
|
||||||
|
import ValidatePullRequest._
|
||||||
|
|
||||||
|
override def trigger = allRequirements
|
||||||
|
override def requires = ValidatePullRequest && MultiNode
|
||||||
|
override lazy val projectSettings = Seq(
|
||||||
|
additionalTasks in ValidatePR += MultiNode.multiTest
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
object UnidocWithPrValidation extends AutoPlugin {
|
||||||
|
import ValidatePullRequest._
|
||||||
|
|
||||||
|
override def trigger = noTrigger
|
||||||
|
override lazy val projectSettings = Seq(
|
||||||
|
additionalTasks in ValidatePR += unidoc in Compile
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue