Document asSubscriber stage (#28128)
* Unfortunately it seems the jdk9-only tests could not actually be compiled. With these changes those can actually be compiled and ran again. * Always link to jdk11 for java.* javadocs * Update sbt-paradox-akka to fix linking to inner classes for javadoc
This commit is contained in:
parent
619a4494d5
commit
25ad10f893
9 changed files with 195 additions and 13 deletions
|
|
@ -10,7 +10,9 @@ import sbt.Keys._
|
|||
object Jdk9 extends AutoPlugin {
|
||||
import JdkOptions.notOnJdk8
|
||||
|
||||
lazy val CompileJdk9 = config("CompileJdk9").extend(Compile)
|
||||
val CompileJdk9 = config("CompileJdk9").extend(Compile)
|
||||
|
||||
val TestJdk9 = config("TestJdk9").extend(Test)
|
||||
|
||||
val SCALA_SOURCE_DIRECTORY = "scala-jdk-9"
|
||||
val SCALA_TEST_SOURCE_DIRECTORY = "scala-jdk9-only"
|
||||
|
|
@ -20,12 +22,26 @@ object Jdk9 extends AutoPlugin {
|
|||
val compileJdk9Settings = Seq(
|
||||
// following the scala-2.12, scala-sbt-1.0, ... convention
|
||||
unmanagedSourceDirectories := notOnJdk8(
|
||||
Seq(
|
||||
(Compile / sourceDirectory).value / SCALA_SOURCE_DIRECTORY,
|
||||
(Compile / sourceDirectory).value / JAVA_SOURCE_DIRECTORY)),
|
||||
Seq(
|
||||
(Compile / sourceDirectory).value / SCALA_SOURCE_DIRECTORY,
|
||||
(Compile / sourceDirectory).value / JAVA_SOURCE_DIRECTORY)),
|
||||
|
||||
scalacOptions := AkkaBuild.DefaultScalacOptions ++ notOnJdk8(Seq("-release", "11")),
|
||||
javacOptions := AkkaBuild.DefaultJavacOptions ++ notOnJdk8(Seq("--release", "11")))
|
||||
|
||||
val testJdk9Settings = Seq(
|
||||
// following the scala-2.12, scala-sbt-1.0, ... convention
|
||||
unmanagedSourceDirectories := notOnJdk8(
|
||||
Seq(
|
||||
(Test / sourceDirectory).value / SCALA_TEST_SOURCE_DIRECTORY,
|
||||
(Test / sourceDirectory).value / JAVA_TEST_SOURCE_DIRECTORY)),
|
||||
|
||||
scalacOptions := AkkaBuild.DefaultScalacOptions ++ notOnJdk8(Seq("-release", "11")),
|
||||
javacOptions := AkkaBuild.DefaultJavacOptions ++ notOnJdk8(Seq("--release", "11")),
|
||||
classpathConfiguration := TestJdk9,
|
||||
externalDependencyClasspath := (externalDependencyClasspath in Test).value
|
||||
)
|
||||
|
||||
val compileSettings = Seq(
|
||||
// It might have been more 'neat' to add the jdk9 products to the jar via packageBin/mappings, but that doesn't work with the OSGi plugin,
|
||||
// so we add them to the fullClasspath instead.
|
||||
|
|
@ -38,5 +54,7 @@ object Jdk9 extends AutoPlugin {
|
|||
override lazy val projectSettings =
|
||||
inConfig(CompileJdk9)(Defaults.compileSettings) ++
|
||||
inConfig(CompileJdk9)(compileJdk9Settings) ++
|
||||
compileSettings
|
||||
compileSettings ++
|
||||
inConfig(TestJdk9)(Defaults.testSettings) ++
|
||||
inConfig(TestJdk9)(testJdk9Settings)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ object Paradox {
|
|||
"extref.ecs.base_url" -> "https://example.lightbend.com/v1/download/%s",
|
||||
"scaladoc.akka.base_url" -> "https://doc.akka.io/api/akka/2.6",
|
||||
"scaladoc.akka.http.base_url" -> "https://doc.akka.io/api/akka-http/current",
|
||||
"javadoc.java.base_url" -> "https://docs.oracle.com/en/java/javase/11/docs/api/java.base/",
|
||||
"javadoc.java.link_style" -> "direct",
|
||||
"javadoc.akka.base_url" -> "https://doc.akka.io/japi/akka/2.6",
|
||||
"javadoc.akka.link_style" -> "direct",
|
||||
"javadoc.akka.http.base_url" -> "https://doc.akka.io/japi/akka-http/current",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue