Share source directory between Scala 2.13 and Scala 3 (#30384)
This commit is contained in:
parent
b65f02e6b4
commit
9b5aad942f
11 changed files with 10 additions and 133 deletions
|
|
@ -130,6 +130,16 @@ object AkkaBuild {
|
|||
Compile / javacOptions ++= (if (allWarnings) Seq("-Xlint:deprecation") else Nil),
|
||||
doc / javacOptions := Seq(),
|
||||
crossVersion := CrossVersion.binary,
|
||||
// Adds a `src/main/scala-2.13+` source directory for code shared
|
||||
// between Scala 2.13 and Scala 3
|
||||
unmanagedSourceDirectories in Compile ++= {
|
||||
val sourceDir = (sourceDirectory in Compile).value
|
||||
CrossVersion.partialVersion(scalaVersion.value) match {
|
||||
case Some((3, n)) => Seq(sourceDir / "scala-2.13+")
|
||||
case Some((2, n)) if n >= 13 => Seq(sourceDir / "scala-2.13+")
|
||||
case _ => Nil
|
||||
}
|
||||
},
|
||||
ThisBuild / ivyLoggingLevel := UpdateLogging.Quiet,
|
||||
licenses := Seq(("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html"))),
|
||||
homepage := Some(url("https://akka.io/")),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue