Include Scala 3 in cross-build (#30392)
* Include Scala 3 in cross-build sbt cross-building sometimes behaves surprisingly, so this does not work yet: when switching to 3.0.1-RC1 it still tries to build the modules that do not support that version yet, even though they are 'excluded'. This also currently breaks cross-publishing, so we cannot merge this. Once this works we should add a note to the documentation clarifying that the Scala 3 artifacts are experimental. * Fix jackson test dependency * Don't publish docs for scala3 artifacts for now * Publish empty doc packages for Scala 3 artifacts
This commit is contained in:
parent
62139a2220
commit
cdad7938b0
8 changed files with 158 additions and 109 deletions
49
build.sbt
49
build.sbt
|
|
@ -40,8 +40,6 @@ shellPrompt := { s =>
|
|||
}
|
||||
resolverSettings
|
||||
|
||||
def isScala213: Boolean = System.getProperty("akka.build.scalaVersion", "").startsWith("2.13")
|
||||
|
||||
// When this is updated the set of modules in ActorSystem.allModules should also be updated
|
||||
lazy val userProjects: Seq[ProjectReference] = List[ProjectReference](
|
||||
actor,
|
||||
|
|
@ -101,6 +99,8 @@ lazy val root = Project(id = "akka", base = file("."))
|
|||
serialversionRemoverPlugin))
|
||||
.settings(Compile / headerCreate / unmanagedSources := (baseDirectory.value / "project").**("*.scala").get)
|
||||
.enablePlugins(CopyrightHeaderForBuild)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions := Nil)
|
||||
|
||||
lazy val actor = akkaModule("akka-actor")
|
||||
.settings(Dependencies.actor)
|
||||
|
|
@ -113,6 +113,8 @@ lazy val actor = akkaModule("akka-actor")
|
|||
.settings(VersionGenerator.settings)
|
||||
.settings(serialversionRemoverPluginSettings)
|
||||
.enablePlugins(BoilerplatePlugin)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions += akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val actorTests = akkaModule("akka-actor-tests")
|
||||
.dependsOn(testkit % "compile->compile;test->test")
|
||||
|
|
@ -148,6 +150,8 @@ lazy val cluster = akkaModule("akka-cluster")
|
|||
.settings(Test / parallelExecution := false)
|
||||
.configs(MultiJvm)
|
||||
.enablePlugins(MultiNodeScalaTest)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val clusterMetrics = akkaModule("akka-cluster-metrics")
|
||||
.dependsOn(
|
||||
|
|
@ -244,6 +248,8 @@ lazy val docs = akkaModule("akka-docs")
|
|||
Jdk9)
|
||||
.disablePlugins(MimaPlugin)
|
||||
.disablePlugins((if (ScalafixSupport.fixTestScope) Nil else Seq(ScalafixPlugin)): _*)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val jackson = akkaModule("akka-serialization-jackson")
|
||||
.dependsOn(
|
||||
|
|
@ -257,6 +263,8 @@ lazy val jackson = akkaModule("akka-serialization-jackson")
|
|||
.settings(OSGi.jackson)
|
||||
.settings(javacOptions += "-parameters")
|
||||
.enablePlugins(ScaladocNoVerificationOfDiagrams)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val multiNodeTestkit = akkaModule("akka-multi-node-testkit")
|
||||
.dependsOn(remote, testkit)
|
||||
|
|
@ -279,6 +287,8 @@ lazy val persistence = akkaModule("akka-persistence")
|
|||
.settings(OSGi.persistence)
|
||||
.settings(Protobuf.settings)
|
||||
.settings(Test / fork := true)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val persistenceQuery = akkaModule("akka-persistence-query")
|
||||
.dependsOn(stream, persistence % "compile->compile;test->test", streamTestkit % "test")
|
||||
|
|
@ -326,6 +336,8 @@ lazy val persistenceTypedTests = akkaModule("akka-persistence-typed-tests")
|
|||
.settings(javacOptions += "-parameters") // for Jackson
|
||||
.disablePlugins(MimaPlugin)
|
||||
.enablePlugins(NoPublish)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val protobuf = akkaModule("akka-protobuf")
|
||||
.settings(OSGi.protobuf)
|
||||
|
|
@ -388,6 +400,8 @@ lazy val remote =
|
|||
.settings(Test / parallelExecution := false)
|
||||
.settings(serialversionRemoverPluginSettings)
|
||||
.enablePlugins(Jdk9)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val remoteTests = akkaModule("akka-remote-tests")
|
||||
.dependsOn(
|
||||
|
|
@ -402,6 +416,8 @@ lazy val remoteTests = akkaModule("akka-remote-tests")
|
|||
.configs(MultiJvm)
|
||||
.enablePlugins(MultiNodeScalaTest, NoPublish)
|
||||
.disablePlugins(MimaPlugin)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val slf4j = akkaModule("akka-slf4j")
|
||||
.dependsOn(actor, testkit % "test->test")
|
||||
|
|
@ -422,6 +438,8 @@ lazy val streamTestkit = akkaModule("akka-stream-testkit")
|
|||
.settings(Dependencies.streamTestkit)
|
||||
.settings(AutomaticModuleName.settings("akka.stream.testkit"))
|
||||
.settings(OSGi.streamTestkit)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val streamTests = akkaModule("akka-stream-tests")
|
||||
.configs(akka.Jdk9.TestJdk9)
|
||||
|
|
@ -483,6 +501,8 @@ lazy val persistenceTyped = akkaModule("akka-persistence-typed")
|
|||
// To be able to import ContainerFormats.proto
|
||||
.settings(Protobuf.importPath := Some(baseDirectory.value / ".." / "akka-remote" / "src" / "main" / "protobuf"))
|
||||
.settings(OSGi.persistenceTyped)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val clusterTyped = akkaModule("akka-cluster-typed")
|
||||
.dependsOn(
|
||||
|
|
@ -524,6 +544,8 @@ lazy val clusterShardingTyped = akkaModule("akka-cluster-sharding-typed")
|
|||
.settings(Protobuf.importPath := Some(baseDirectory.value / ".." / "akka-remote" / "src" / "main" / "protobuf"))
|
||||
.configs(MultiJvm)
|
||||
.enablePlugins(MultiNodeScalaTest)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val streamTyped = akkaModule("akka-stream-typed")
|
||||
.dependsOn(
|
||||
|
|
@ -539,6 +561,8 @@ lazy val actorTestkitTyped = akkaModule("akka-actor-testkit-typed")
|
|||
.dependsOn(actorTyped, slf4j, testkit % "compile->compile;test->test")
|
||||
.settings(AutomaticModuleName.settings("akka.actor.testkit.typed"))
|
||||
.settings(Dependencies.actorTestkitTyped)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val actorTypedTests = akkaModule("akka-actor-typed-tests")
|
||||
.dependsOn(actorTyped % "compile->CompileJdk9", actorTestkitTyped % "compile->compile;test->test")
|
||||
|
|
@ -551,12 +575,16 @@ lazy val discovery = akkaModule("akka-discovery")
|
|||
.settings(Dependencies.discovery)
|
||||
.settings(AutomaticModuleName.settings("akka.discovery"))
|
||||
.settings(OSGi.discovery)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val coordination = akkaModule("akka-coordination")
|
||||
.dependsOn(actor, testkit % "test->test", actorTests % "test->test")
|
||||
.settings(Dependencies.coordination)
|
||||
.settings(AutomaticModuleName.settings("akka.coordination"))
|
||||
.settings(OSGi.coordination)
|
||||
// TODO https://github.com/akka/akka/issues/30243
|
||||
.settings(crossScalaVersions -= akka.Dependencies.scala3Version)
|
||||
|
||||
lazy val billOfMaterials = Project("akka-bill-of-materials", file("akka-bill-of-materials"))
|
||||
.enablePlugins(BillOfMaterialsPlugin)
|
||||
|
|
@ -576,17 +604,12 @@ lazy val serialversionRemoverPlugin =
|
|||
Compile / doc / sources := Nil,
|
||||
Compile / publishArtifact := false)
|
||||
|
||||
lazy val serialversionRemoverPluginSettings = {
|
||||
if (akka.Dependencies.getScalaVersion() == akka.Dependencies.scala3Version) {
|
||||
Seq(
|
||||
autoCompilerPlugins := true,
|
||||
Compile / scalacOptions += (
|
||||
"-Xplugin:" + (serialversionRemoverPlugin / Compile / Keys.`package`).value.getAbsolutePath.toString
|
||||
))
|
||||
} else {
|
||||
Seq()
|
||||
}
|
||||
}
|
||||
lazy val serialversionRemoverPluginSettings = Seq(
|
||||
Compile / scalacOptions ++= (
|
||||
if (scalaVersion.value.startsWith("3."))
|
||||
Seq("-Xplugin:" + (serialversionRemoverPlugin / Compile / Keys.`package`).value.getAbsolutePath.toString)
|
||||
else Nil
|
||||
))
|
||||
|
||||
def akkaModule(name: String): Project =
|
||||
Project(id = name, base = file(name))
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@ object AkkaBuild {
|
|||
|
||||
private def allWarnings: Boolean = System.getProperty("akka.allwarnings", "false").toBoolean
|
||||
|
||||
final val DefaultScalacOptions = {
|
||||
if (Dependencies.getScalaVersion().startsWith("3.")) {
|
||||
final val DefaultScalacOptions = Def.setting {
|
||||
if (scalaVersion.value.startsWith("3.")) {
|
||||
Seq(
|
||||
"-encoding",
|
||||
"UTF-8",
|
||||
|
|
@ -127,9 +127,13 @@ object AkkaBuild {
|
|||
resolverSettings,
|
||||
TestExtras.Filter.settings,
|
||||
// compile options
|
||||
Compile / scalacOptions ++= DefaultScalacOptions,
|
||||
Compile / scalacOptions ++= DefaultScalacOptions.value,
|
||||
Compile / scalacOptions ++=
|
||||
JdkOptions.targetJdkScalacOptions(targetSystemJdk.value, optionalDir(jdk8home.value), fullJavaHomes.value),
|
||||
JdkOptions.targetJdkScalacOptions(
|
||||
targetSystemJdk.value,
|
||||
optionalDir(jdk8home.value),
|
||||
fullJavaHomes.value,
|
||||
scalaVersion.value),
|
||||
Compile / scalacOptions ++= (if (allWarnings) Seq("-deprecation") else Nil),
|
||||
Test / scalacOptions := (Test / scalacOptions).value.filterNot(opt =>
|
||||
opt == "-Xlog-reflective-calls" || opt.contains("genjavadoc")),
|
||||
|
|
|
|||
|
|
@ -65,33 +65,28 @@ object AkkaDisciplinePlugin extends AutoPlugin {
|
|||
|
||||
val defaultScalaOptions = "-Wconf:cat=unused-nowarn:s,any:e"
|
||||
|
||||
lazy val nowarnSettings = {
|
||||
Dependencies.getScalaVersion() match {
|
||||
case three if three.startsWith("3.") =>
|
||||
Seq(Compile / scalacOptions := Seq(), Compile / doc / scalacOptions := Seq())
|
||||
case _ =>
|
||||
Seq(
|
||||
Compile / scalacOptions += defaultScalaOptions,
|
||||
Test / scalacOptions += defaultScalaOptions,
|
||||
Compile / doc / scalacOptions := Seq())
|
||||
}
|
||||
}
|
||||
lazy val nowarnSettings = Seq(
|
||||
Compile / scalacOptions ++= (
|
||||
if (scalaVersion.value.startsWith("3.")) Nil
|
||||
else Seq(defaultScalaOptions)
|
||||
),
|
||||
Test / scalacOptions ++= (
|
||||
if (scalaVersion.value.startsWith("3.")) Nil
|
||||
else Seq(defaultScalaOptions)
|
||||
),
|
||||
Compile / doc / scalacOptions := Seq())
|
||||
|
||||
/**
|
||||
* We are a little less strict in docs
|
||||
*/
|
||||
val docs = {
|
||||
Dependencies.getScalaVersion() match {
|
||||
case _ =>
|
||||
Seq(
|
||||
Compile / scalacOptions -= defaultScalaOptions,
|
||||
Compile / scalacOptions += "-Wconf:cat=unused:s,cat=deprecation:s,cat=unchecked:s,any:e",
|
||||
Test / scalacOptions --= Seq("-Xlint", "-unchecked", "-deprecation"),
|
||||
Test / scalacOptions -= defaultScalaOptions,
|
||||
Test / scalacOptions += "-Wconf:cat=unused:s,cat=deprecation:s,cat=unchecked:s,any:e",
|
||||
Compile / doc / scalacOptions := Seq())
|
||||
}
|
||||
}
|
||||
val docs =
|
||||
Seq(
|
||||
Compile / scalacOptions -= defaultScalaOptions,
|
||||
Compile / scalacOptions += "-Wconf:cat=unused:s,cat=deprecation:s,cat=unchecked:s,any:e",
|
||||
Test / scalacOptions --= Seq("-Xlint", "-unchecked", "-deprecation"),
|
||||
Test / scalacOptions -= defaultScalaOptions,
|
||||
Test / scalacOptions += "-Wconf:cat=unused:s,cat=deprecation:s,cat=unchecked:s,any:e",
|
||||
Compile / doc / scalacOptions := Seq())
|
||||
|
||||
lazy val disciplineSettings =
|
||||
if (enabled) {
|
||||
|
|
@ -99,7 +94,7 @@ object AkkaDisciplinePlugin extends AutoPlugin {
|
|||
Compile / scalacOptions ++= Seq("-Xfatal-warnings"),
|
||||
Test / scalacOptions --= testUndicipline,
|
||||
Compile / javacOptions ++= (
|
||||
if (Dependencies.getScalaVersion().startsWith("3.")) {
|
||||
if (scalaVersion.value.startsWith("3.")) {
|
||||
Seq()
|
||||
} else {
|
||||
if (!nonFatalJavaWarningsFor(name.value)) Seq("-Werror", "-Xlint:deprecation", "-Xlint:unchecked")
|
||||
|
|
|
|||
|
|
@ -37,15 +37,15 @@ object Dependencies {
|
|||
|
||||
val sslConfigVersion = "0.4.2"
|
||||
|
||||
val scalaTestVersion = {
|
||||
if (getScalaVersion().startsWith("3.")) {
|
||||
val scalaTestVersion = Def.setting {
|
||||
if (scalaVersion.value.startsWith("3.")) {
|
||||
"3.2.9"
|
||||
} else {
|
||||
"3.1.4"
|
||||
}
|
||||
}
|
||||
val scalaTestScalaCheckVersion = {
|
||||
if (getScalaVersion().startsWith("3.")) {
|
||||
val scalaTestScalaCheckVersion = Def.setting {
|
||||
if (scalaVersion.value.startsWith("3.")) {
|
||||
"1-15"
|
||||
} else {
|
||||
"1-14"
|
||||
|
|
@ -53,22 +53,17 @@ object Dependencies {
|
|||
}
|
||||
val scalaCheckVersion = "1.15.1"
|
||||
|
||||
def getScalaVersion() = {
|
||||
// don't mandate patch not specified to allow builds to migrate
|
||||
System.getProperty("akka.build.scalaVersion", "default") match {
|
||||
case twoThirteen if twoThirteen.startsWith("2.13") => scala213Version
|
||||
case twoTwelve if twoTwelve.startsWith("2.12") => scala212Version
|
||||
case three if three.startsWith("3.") => scala3Version
|
||||
case "default" => scala213Version
|
||||
case other =>
|
||||
throw new IllegalArgumentException(s"Unsupported scala version [$other]. Must be 2.12, 2.13 or 3.x.")
|
||||
}
|
||||
}
|
||||
|
||||
val Versions =
|
||||
Seq(
|
||||
crossScalaVersions := Seq(scala212Version, scala213Version),
|
||||
scalaVersion := getScalaVersion(),
|
||||
scalaVersion := {
|
||||
System.getProperty("akka.build.scalaVersion", "default") match {
|
||||
case v if v.startsWith("2.13") => scala213Version
|
||||
case v if v.startsWith("2.12") => scala212Version
|
||||
case v if v.startsWith("3.") => scala3Version
|
||||
case "default" => scala213Version
|
||||
}
|
||||
},
|
||||
java8CompatVersion := {
|
||||
CrossVersion.partialVersion(scalaVersion.value) match {
|
||||
// java8-compat is only used in a couple of places for 2.13,
|
||||
|
|
@ -143,15 +138,23 @@ object Dependencies {
|
|||
val junit = "junit" % "junit" % junitVersion % "test" // Common Public License 1.0
|
||||
val logback = Compile.logback % "test" // EPL 1.0
|
||||
|
||||
val scalatest = "org.scalatest" %% "scalatest" % scalaTestVersion % "test" // ApacheV2
|
||||
val scalatest = Def.setting { "org.scalatest" %% "scalatest" % scalaTestVersion.value % "test" } // ApacheV2
|
||||
|
||||
// The 'scalaTestPlus' projects are independently versioned,
|
||||
// but the version of each module starts with the scalatest
|
||||
// version it was intended to work with
|
||||
val scalatestJUnit = "org.scalatestplus" %% "junit-4-13" % (scalaTestVersion + ".0") % "test" // ApacheV2
|
||||
val scalatestTestNG = "org.scalatestplus" %% "testng-6-7" % (scalaTestVersion + ".0") % "test" // ApacheV2
|
||||
val scalatestScalaCheck = "org.scalatestplus" %% s"scalacheck-${scalaTestScalaCheckVersion}" % (scalaTestVersion + ".0") % "test" // ApacheV2
|
||||
val scalatestMockito = "org.scalatestplus" %% "mockito-3-4" % (scalaTestVersion + ".0") % "test" // ApacheV2
|
||||
val scalatestJUnit = Def.setting {
|
||||
"org.scalatestplus" %% "junit-4-13" % (scalaTestVersion.value + ".0") % "test"
|
||||
} // ApacheV2
|
||||
val scalatestTestNG = Def.setting {
|
||||
"org.scalatestplus" %% "testng-6-7" % (scalaTestVersion.value + ".0") % "test"
|
||||
} // ApacheV2
|
||||
val scalatestScalaCheck = Def.setting {
|
||||
"org.scalatestplus" %% s"scalacheck-${scalaTestScalaCheckVersion.value}" % (scalaTestVersion.value + ".0") % "test"
|
||||
} // ApacheV2
|
||||
val scalatestMockito = Def.setting {
|
||||
"org.scalatestplus" %% "mockito-3-4" % (scalaTestVersion.value + ".0") % "test"
|
||||
} // ApacheV2
|
||||
|
||||
val pojosr = "com.googlecode.pojosr" % "de.kalpatec.pojosr.framework" % "0.2.1" % "test" // ApacheV2
|
||||
val tinybundles = "org.ops4j.pax.tinybundles" % "tinybundles" % "3.0.0" % "test" // ApacheV2
|
||||
|
|
@ -192,7 +195,7 @@ object Dependencies {
|
|||
|
||||
val junit = Compile.junit % "optional;provided;test"
|
||||
|
||||
val scalatest = "org.scalatest" %% "scalatest" % scalaTestVersion % "optional;provided;test" // ApacheV2
|
||||
val scalatest = Def.setting { "org.scalatest" %% "scalatest" % scalaTestVersion.value % "optional;provided;test" } // ApacheV2
|
||||
|
||||
val logback = Compile.logback % "optional;provided;test" // EPL 1.0
|
||||
|
||||
|
|
@ -210,17 +213,17 @@ object Dependencies {
|
|||
|
||||
val actorTyped = l ++= Seq(slf4jApi)
|
||||
|
||||
val discovery = l ++= Seq(Test.junit, Test.scalatest)
|
||||
val discovery = l ++= Seq(Test.junit, Test.scalatest.value)
|
||||
|
||||
val coordination = l ++= Seq(Test.junit, Test.scalatest)
|
||||
val coordination = l ++= Seq(Test.junit, Test.scalatest.value)
|
||||
|
||||
val testkit = l ++= Seq(Test.junit, Test.scalatest) ++ Test.metricsAll
|
||||
val testkit = l ++= Seq(Test.junit, Test.scalatest.value) ++ Test.metricsAll
|
||||
|
||||
val actorTests = l ++= Seq(
|
||||
Test.junit,
|
||||
Test.scalatest,
|
||||
Test.scalatestJUnit,
|
||||
Test.scalatestScalaCheck,
|
||||
Test.scalatest.value,
|
||||
Test.scalatestJUnit.value,
|
||||
Test.scalatestScalaCheck.value,
|
||||
Test.commonsCodec,
|
||||
Test.commonsMath,
|
||||
Test.jimfs,
|
||||
|
|
@ -228,33 +231,37 @@ object Dependencies {
|
|||
Provided.activation // dockerClient needs javax.activation.DataSource in JDK 11+
|
||||
)
|
||||
|
||||
val actorTestkitTyped = l ++= Seq(Provided.logback, Provided.junit, Provided.scalatest, Test.scalatestJUnit)
|
||||
val actorTestkitTyped = l ++= Seq(
|
||||
Provided.logback,
|
||||
Provided.junit,
|
||||
Provided.scalatest.value,
|
||||
Test.scalatestJUnit.value)
|
||||
|
||||
val pki = l ++=
|
||||
Seq(
|
||||
asnOne,
|
||||
// pull up slf4j version from the one provided transitively in asnOne to fix unidoc
|
||||
Compile.slf4jApi,
|
||||
Test.scalatest)
|
||||
Test.scalatest.value)
|
||||
|
||||
val remoteDependencies = Seq(netty, aeronDriver, aeronClient)
|
||||
val remoteOptionalDependencies = remoteDependencies.map(_ % "optional")
|
||||
|
||||
val remote = l ++= Seq(agrona, Test.junit, Test.scalatest, Test.jimfs, Test.protobufRuntime) ++ remoteOptionalDependencies
|
||||
val remote = l ++= Seq(agrona, Test.junit, Test.scalatest.value, Test.jimfs, Test.protobufRuntime) ++ remoteOptionalDependencies
|
||||
|
||||
val remoteTests = l ++= Seq(Test.junit, Test.scalatest) ++ remoteDependencies
|
||||
val remoteTests = l ++= Seq(Test.junit, Test.scalatest.value) ++ remoteDependencies
|
||||
|
||||
val multiNodeTestkit = l ++= Seq(netty)
|
||||
|
||||
val cluster = l ++= Seq(Test.junit, Test.scalatest)
|
||||
val cluster = l ++= Seq(Test.junit, Test.scalatest.value)
|
||||
|
||||
val clusterTools = l ++= Seq(Test.junit, Test.scalatest)
|
||||
val clusterTools = l ++= Seq(Test.junit, Test.scalatest.value)
|
||||
|
||||
val clusterSharding = l ++= Seq(
|
||||
Provided.levelDBmultiJVM,
|
||||
Provided.levelDBNative,
|
||||
Test.junit,
|
||||
Test.scalatest,
|
||||
Test.scalatest.value,
|
||||
Test.commonsIo)
|
||||
|
||||
val clusterMetrics = l ++= Seq(
|
||||
|
|
@ -262,32 +269,37 @@ object Dependencies {
|
|||
Test.slf4jJul,
|
||||
Test.slf4jLog4j,
|
||||
Test.logback,
|
||||
Test.scalatestMockito)
|
||||
Test.scalatestMockito.value)
|
||||
|
||||
val distributedData = l ++= Seq(lmdb, Test.junit, Test.scalatest)
|
||||
val distributedData = l ++= Seq(lmdb, Test.junit, Test.scalatest.value)
|
||||
|
||||
val slf4j = l ++= Seq(slf4jApi, Test.logback)
|
||||
|
||||
val persistence = l ++= Seq(
|
||||
Provided.levelDB,
|
||||
Provided.levelDBNative,
|
||||
Test.scalatest,
|
||||
Test.scalatestJUnit,
|
||||
Test.scalatest.value,
|
||||
Test.scalatestJUnit.value,
|
||||
Test.junit,
|
||||
Test.commonsIo,
|
||||
Test.commonsCodec)
|
||||
|
||||
val persistenceQuery = l ++= Seq(Test.scalatest, Test.junit, Test.commonsIo, Provided.levelDB, Provided.levelDBNative)
|
||||
val persistenceQuery = l ++= Seq(
|
||||
Test.scalatest.value,
|
||||
Test.junit,
|
||||
Test.commonsIo,
|
||||
Provided.levelDB,
|
||||
Provided.levelDBNative)
|
||||
|
||||
val persistenceTck = l ++= Seq(
|
||||
Test.scalatest.withConfigurations(Some("compile")),
|
||||
Test.scalatest.value.withConfigurations(Some("compile")),
|
||||
Test.junit.withConfigurations(Some("compile")),
|
||||
Provided.levelDB,
|
||||
Provided.levelDBNative)
|
||||
|
||||
val persistenceTestKit = l ++= Seq(Test.scalatest, Test.logback)
|
||||
val persistenceTestKit = l ++= Seq(Test.scalatest.value, Test.logback)
|
||||
|
||||
val persistenceTypedTests = l ++= Seq(Test.scalatest, Test.logback)
|
||||
val persistenceTypedTests = l ++= Seq(Test.scalatest.value, Test.logback)
|
||||
|
||||
val persistenceShared = l ++= Seq(Provided.levelDB, Provided.levelDBNative, Test.logback)
|
||||
|
||||
|
|
@ -301,16 +313,18 @@ object Dependencies {
|
|||
jacksonCbor,
|
||||
lz4Java,
|
||||
Test.junit,
|
||||
Test.scalatest) ++
|
||||
(if (getScalaVersion() == scala3Version)
|
||||
// jackson-module-scala is only available for Scala 3 from 2.13.0 onwards.
|
||||
// since we don't depend on it ourselves, but provide it as a transitive
|
||||
// dependency for convenience, we can leave it out for Scala 3 for now,
|
||||
// and depend on 2.13.0-rc1 for our tests. Eventually we should consider
|
||||
// whether to update all jackson artifacts for Scala 3.
|
||||
Seq("com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.13.0-rc1" % "test")
|
||||
else
|
||||
Seq(jacksonScala))
|
||||
Test.scalatest.value) ++
|
||||
(
|
||||
// jackson-module-scala is only available for Scala 3 from 2.13.0 onwards.
|
||||
// since we don't depend on it ourselves, but provide it as a transitive
|
||||
// dependency for convenience, we can leave it out for Scala 3 for now,
|
||||
// and depend on 2.13.0-rc1 for our tests. Eventually we should consider
|
||||
// whether to update all jackson artifacts for Scala 3.
|
||||
if (scalaVersion.value.startsWith("3."))
|
||||
Seq("com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.13.0-rc1" % "test")
|
||||
else
|
||||
Seq(jacksonScala)
|
||||
)
|
||||
|
||||
val osgi = l ++= Seq(
|
||||
osgiCore,
|
||||
|
|
@ -319,25 +333,30 @@ object Dependencies {
|
|||
Test.commonsIo,
|
||||
Test.pojosr,
|
||||
Test.tinybundles,
|
||||
Test.scalatest,
|
||||
Test.scalatest.value,
|
||||
Test.junit)
|
||||
|
||||
val docs = l ++= Seq(Test.scalatest, Test.junit, Docs.sprayJson, Docs.gson, Provided.levelDB)
|
||||
val docs = l ++= Seq(Test.scalatest.value, Test.junit, Docs.sprayJson, Docs.gson, Provided.levelDB)
|
||||
|
||||
val benchJmh = l ++= Seq(logback, Provided.levelDB, Provided.levelDBNative, Compile.jctools)
|
||||
|
||||
// akka stream
|
||||
|
||||
lazy val stream = l ++= Seq[sbt.ModuleID](reactiveStreams, sslConfigCore, Test.scalatest)
|
||||
lazy val stream = l ++= Seq[sbt.ModuleID](reactiveStreams, sslConfigCore, Test.scalatest.value)
|
||||
|
||||
lazy val streamTestkit = l ++= Seq(Test.scalatest, Test.scalatestScalaCheck, Test.junit)
|
||||
lazy val streamTestkit = l ++= Seq(Test.scalatest.value, Test.scalatestScalaCheck.value, Test.junit)
|
||||
|
||||
lazy val streamTests = l ++= Seq(Test.scalatest, Test.scalatestScalaCheck, Test.junit, Test.commonsIo, Test.jimfs)
|
||||
lazy val streamTests = l ++= Seq(
|
||||
Test.scalatest.value,
|
||||
Test.scalatestScalaCheck.value,
|
||||
Test.junit,
|
||||
Test.commonsIo,
|
||||
Test.jimfs)
|
||||
|
||||
lazy val streamTestsTck = l ++= Seq(
|
||||
Test.scalatest,
|
||||
Test.scalatestTestNG,
|
||||
Test.scalatestScalaCheck,
|
||||
Test.scalatest.value,
|
||||
Test.scalatestTestNG.value,
|
||||
Test.scalatestScalaCheck.value,
|
||||
Test.junit,
|
||||
Test.reactiveStreamsTck)
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,14 @@ object Scaladoc extends AutoPlugin {
|
|||
// -release caused build failures when generating javadoc:
|
||||
Compile / scalacOptions --= Seq("-release", "8"),
|
||||
autoAPIMappings := CliOptions.scaladocAutoAPI.get)) ++
|
||||
Seq(Compile / validateDiagrams := true) ++
|
||||
Seq(
|
||||
// Publishing scala3 docs is broken (https://github.com/akka/akka/issues/30788),
|
||||
// for now we just skip it:
|
||||
Compile / doc / sources := (
|
||||
if (scalaVersion.value.startsWith("3.")) Seq()
|
||||
else (Compile / doc / sources).value
|
||||
),
|
||||
Compile / validateDiagrams := true) ++
|
||||
CliOptions.scaladocDiagramsEnabled.ifTrue(Compile / doc := {
|
||||
val docs = (Compile / doc).value
|
||||
if ((Compile / validateDiagrams).value)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ object Jdk9 extends AutoPlugin {
|
|||
Seq(
|
||||
(Compile / sourceDirectory).value / SCALA_SOURCE_DIRECTORY,
|
||||
(Compile / sourceDirectory).value / JAVA_SOURCE_DIRECTORY)),
|
||||
scalacOptions := AkkaBuild.DefaultScalacOptions ++ notOnJdk8(Seq("-release", "11")),
|
||||
scalacOptions := AkkaBuild.DefaultScalacOptions.value ++ notOnJdk8(Seq("-release", "11")),
|
||||
javacOptions := AkkaBuild.DefaultJavacOptions ++ notOnJdk8(Seq("--release", "11")))
|
||||
|
||||
val testJdk9Settings = Seq(
|
||||
|
|
@ -34,7 +34,7 @@ object Jdk9 extends AutoPlugin {
|
|||
Seq(
|
||||
(Test / sourceDirectory).value / SCALA_TEST_SOURCE_DIRECTORY,
|
||||
(Test / sourceDirectory).value / JAVA_TEST_SOURCE_DIRECTORY)),
|
||||
scalacOptions := AkkaBuild.DefaultScalacOptions ++ notOnJdk8(Seq("-release", "11")),
|
||||
scalacOptions := AkkaBuild.DefaultScalacOptions.value ++ notOnJdk8(Seq("-release", "11")),
|
||||
javacOptions := AkkaBuild.DefaultJavacOptions ++ notOnJdk8(Seq("--release", "11")),
|
||||
compile := compile.dependsOn(CompileJdk9 / compile).value,
|
||||
classpathConfiguration := TestJdk9,
|
||||
|
|
|
|||
|
|
@ -32,12 +32,13 @@ object JdkOptions extends AutoPlugin {
|
|||
def targetJdkScalacOptions(
|
||||
targetSystemJdk: Boolean,
|
||||
jdk8home: Option[File],
|
||||
fullJavaHomes: Map[String, File]): Seq[String] =
|
||||
fullJavaHomes: Map[String, File],
|
||||
scalaVersion: String): Seq[String] =
|
||||
selectOptions(
|
||||
targetSystemJdk,
|
||||
jdk8home,
|
||||
fullJavaHomes,
|
||||
Seq(if (Dependencies.getScalaVersion().startsWith("3.0")) "-Xtarget:8" else "-target:jvm-1.8"),
|
||||
Seq(if (scalaVersion.startsWith("3.0")) "-Xtarget:8" else "-target:jvm-1.8"),
|
||||
// '-release 8' is not enough, for some reason we need the 8 rt.jar
|
||||
// explicitly. To test whether this has the desired effect, compile
|
||||
// akka-remote and check the invocation of 'ByteBuffer.clear()' in
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ object Paradox {
|
|||
"scala.version" -> scalaVersion.value,
|
||||
"scala.binary.version" -> scalaBinaryVersion.value,
|
||||
"akka.version" -> version.value,
|
||||
"scalatest.version" -> Dependencies.scalaTestVersion,
|
||||
"scalatest.version" -> Dependencies.scalaTestVersion.value,
|
||||
"sigar_loader.version" -> "1.6.6-rev002",
|
||||
"algolia.docsearch.api_key" -> "543bad5ad786495d9ccd445ed34ed082",
|
||||
"algolia.docsearch.index_name" -> "akka_io",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue