Some minor build clean ups
- Resolve some warnings due to depracations - Fix an infinite recursion - Minor refactoring to use sys.props instead of System.getProperty
This commit is contained in:
parent
9f83f437f9
commit
7cdca36ab8
3 changed files with 6 additions and 7 deletions
|
|
@ -360,7 +360,7 @@ lazy val protobufV3 = akkaModule("akka-protobuf-v3")
|
||||||
// https://github.com/sbt/sbt-assembly/issues/400
|
// https://github.com/sbt/sbt-assembly/issues/400
|
||||||
.inLibrary(Dependencies.Compile.Provided.protobufRuntime)
|
.inLibrary(Dependencies.Compile.Provided.protobufRuntime)
|
||||||
.inProject),
|
.inProject),
|
||||||
assembly / assemblyOption := (assembly / assemblyOption).value.copy(includeScala = false, includeBin = false),
|
assembly / assemblyOption := (assembly / assemblyOption).value.withIncludeScala(false).withIncludeBin(false),
|
||||||
autoScalaLibrary := false, // do not include scala dependency in pom
|
autoScalaLibrary := false, // do not include scala dependency in pom
|
||||||
exportJars := true, // in dependent projects, use assembled and shaded jar
|
exportJars := true, // in dependent projects, use assembled and shaded jar
|
||||||
makePomConfiguration := makePomConfiguration.value
|
makePomConfiguration := makePomConfiguration.value
|
||||||
|
|
|
||||||
|
|
@ -132,8 +132,8 @@ object AkkaBuild {
|
||||||
crossVersion := CrossVersion.binary,
|
crossVersion := CrossVersion.binary,
|
||||||
// Adds a `src/main/scala-2.13+` source directory for code shared
|
// Adds a `src/main/scala-2.13+` source directory for code shared
|
||||||
// between Scala 2.13 and Scala 3
|
// between Scala 2.13 and Scala 3
|
||||||
unmanagedSourceDirectories in Compile ++= {
|
Compile / unmanagedSourceDirectories ++= {
|
||||||
val sourceDir = (sourceDirectory in Compile).value
|
val sourceDir = (Compile / sourceDirectory).value
|
||||||
CrossVersion.partialVersion(scalaVersion.value) match {
|
CrossVersion.partialVersion(scalaVersion.value) match {
|
||||||
case Some((3, n)) => Seq(sourceDir / "scala-2.13+")
|
case Some((3, n)) => Seq(sourceDir / "scala-2.13+")
|
||||||
case Some((2, n)) if n >= 13 => Seq(sourceDir / "scala-2.13+")
|
case Some((2, n)) if n >= 13 => Seq(sourceDir / "scala-2.13+")
|
||||||
|
|
@ -213,7 +213,7 @@ object AkkaBuild {
|
||||||
group.runPolicy match {
|
group.runPolicy match {
|
||||||
case Tests.SubProcess(forkOptions) =>
|
case Tests.SubProcess(forkOptions) =>
|
||||||
// format: off
|
// format: off
|
||||||
group.copy(runPolicy = Tests.SubProcess(
|
group.withRunPolicy(Tests.SubProcess(
|
||||||
forkOptions.withWorkingDirectory(workingDirectory = Some(new File(System.getProperty("user.dir"))))))
|
forkOptions.withWorkingDirectory(workingDirectory = Some(new File(System.getProperty("user.dir"))))))
|
||||||
// format: on
|
// format: on
|
||||||
case _ => group
|
case _ => group
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,7 @@ object MultiNode extends AutoPlugin {
|
||||||
|
|
||||||
// MultiJvm tests can be excluded from normal test target an validatePullRequest
|
// MultiJvm tests can be excluded from normal test target an validatePullRequest
|
||||||
// with -Dakka.test.multi-in-test=false
|
// with -Dakka.test.multi-in-test=false
|
||||||
val multiNodeTestInTest: Boolean =
|
val multiNodeTestInTest: Boolean = sys.props.getOrElse("akka.test.multi-in-test", "true").toBoolean
|
||||||
System.getProperty("akka.test.multi-in-test", "true") == "true"
|
|
||||||
|
|
||||||
object CliOptions {
|
object CliOptions {
|
||||||
val multiNode = CliOption("akka.test.multi-node", false)
|
val multiNode = CliOption("akka.test.multi-node", false)
|
||||||
|
|
@ -85,7 +84,7 @@ object MultiNode extends AutoPlugin {
|
||||||
(name: String) =>
|
(name: String) =>
|
||||||
new Logger {
|
new Logger {
|
||||||
def trace(t: => Throwable): Unit = { logger.trace(t) }
|
def trace(t: => Throwable): Unit = { logger.trace(t) }
|
||||||
def success(message: => String): Unit = { success(message) }
|
def success(message: => String): Unit = { logger.success(message) }
|
||||||
def log(level: Level.Value, message: => String): Unit =
|
def log(level: Level.Value, message: => String): Unit =
|
||||||
logger.log(level, s"[${scala.Console.BLUE}$name${scala.Console.RESET}] $message")
|
logger.log(level, s"[${scala.Console.BLUE}$name${scala.Console.RESET}] $message")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue