Consolidate Paradox settings, add includes workaround #27656 (#27657)

This commit is contained in:
Helena Edelson 2019-09-09 05:25:33 -07:00 committed by Johan Andrén
parent 58e40e9193
commit 9a9e21a62b
2 changed files with 78 additions and 50 deletions

View file

@ -1,4 +1,4 @@
import akka.{ AutomaticModuleName, CopyrightHeaderForBuild, CrossJava, ParadoxSupport, ScalafixIgnoreFilePlugin }
import akka.{ AutomaticModuleName, CopyrightHeaderForBuild, Paradox, ParadoxSupport, ScalafixIgnoreFilePlugin }
enablePlugins(
UnidocRoot,
@ -203,51 +203,8 @@ lazy val docs = akkaModule("akka-docs")
actorTypedTests % "compile->compile;test->test",
streamTestkit % "compile->compile;test->test")
.settings(Dependencies.docs)
.settings(
name in (Compile, paradox) := "Akka",
Compile / paradoxProperties ++= Map(
"canonical.base_url" -> "https://doc.akka.io/docs/akka/current",
"github.base_url" -> GitHub
.url(version.value), // for links like this: @github[#1](#1) or @github[83986f9](83986f9)
"extref.akka.http.base_url" -> "https://doc.akka.io/docs/akka-http/current/%s",
"extref.wikipedia.base_url" -> "https://en.wikipedia.org/wiki/%s",
"extref.github.base_url" -> (GitHub.url(version.value) + "/%s"), // for links to our sources
"extref.samples.base_url" -> "https://developer.lightbend.com/start/?group=akka&project=%s",
"extref.ecs.base_url" -> "https://example.lightbend.com/v1/download/%s",
"scaladoc.akka.base_url" -> "https://doc.akka.io/api/akka/2.5",
"scaladoc.akka.http.base_url" -> "https://doc.akka.io/api/akka-http/current",
"javadoc.akka.base_url" -> "https://doc.akka.io/japi/akka/2.5",
"javadoc.akka.http.base_url" -> "https://doc.akka.io/japi/akka-http/current",
"scala.version" -> scalaVersion.value,
"scala.binary_version" -> scalaBinaryVersion.value,
"akka.version" -> version.value,
"scalatest.version" -> Dependencies.scalaTestVersion.value,
"sigar_loader.version" -> "1.6.6-rev002",
"algolia.docsearch.api_key" -> "543bad5ad786495d9ccd445ed34ed082",
"algolia.docsearch.index_name" -> "akka_io",
"google.analytics.account" -> "UA-21117439-1",
"google.analytics.domain.name" -> "akka.io",
"signature.akka.base_dir" -> (baseDirectory in ThisBuild).value.getAbsolutePath,
"fiddle.code.base_dir" -> (sourceDirectory in Test).value.getAbsolutePath,
"fiddle.akka.base_dir" -> (baseDirectory in ThisBuild).value.getAbsolutePath,
"aeron_version" -> Dependencies.aeronVersion,
"netty_version" -> Dependencies.nettyVersion),
Compile / paradoxGroups := Map("Language" -> Seq("Scala", "Java")),
paradoxRoots := List(
// The real index:
"index.html",
// Page that recommends Alpakka:
"camel.html",
// TODO seems like an orphan?
"fault-tolerance-sample.html",
// FIXME https://github.com/lightbend/paradox/issues/350
// Links in a snippet are interpreted relative to the page the snippet is included in,
// instead of relative to the place where the snippet is declared.
"includes.html"
),
resolvers += Resolver.jcenterRepo,
apidocRootPackage := "akka",
deployRsyncArtifact := List((paradox in Compile).value -> s"www/docs/akka/${version.value}"))
.settings(Paradox.settings)
.settings(ParadoxSupport.paradoxWithCustomDirectives)
.enablePlugins(
AkkaParadoxPlugin,
DeployRsync,
@ -255,7 +212,6 @@ lazy val docs = akkaModule("akka-docs")
ParadoxBrowse,
ScaladocNoVerificationOfDiagrams,
StreamOperatorsIndexGenerator)
.settings(ParadoxSupport.paradoxWithCustomDirectives)
.disablePlugins(MimaPlugin, WhiteSourcePlugin)
.disablePlugins(ScalafixPlugin)
@ -496,9 +452,7 @@ lazy val streamTyped = akkaModule("akka-stream-typed")
.enablePlugins(ScaladocNoVerificationOfDiagrams)
lazy val actorTestkitTyped = akkaModule("akka-actor-testkit-typed")
.dependsOn(actorTyped,
slf4j,
testkit % "compile->compile;test->test")
.dependsOn(actorTyped, slf4j, testkit % "compile->compile;test->test")
.settings(AutomaticModuleName.settings("akka.actor.testkit.typed"))
.settings(Dependencies.actorTestkitTyped)