parent
58e40e9193
commit
9a9e21a62b
2 changed files with 78 additions and 50 deletions
54
build.sbt
54
build.sbt
|
|
@ -1,4 +1,4 @@
|
||||||
import akka.{ AutomaticModuleName, CopyrightHeaderForBuild, CrossJava, ParadoxSupport, ScalafixIgnoreFilePlugin }
|
import akka.{ AutomaticModuleName, CopyrightHeaderForBuild, Paradox, ParadoxSupport, ScalafixIgnoreFilePlugin }
|
||||||
|
|
||||||
enablePlugins(
|
enablePlugins(
|
||||||
UnidocRoot,
|
UnidocRoot,
|
||||||
|
|
@ -203,51 +203,8 @@ lazy val docs = akkaModule("akka-docs")
|
||||||
actorTypedTests % "compile->compile;test->test",
|
actorTypedTests % "compile->compile;test->test",
|
||||||
streamTestkit % "compile->compile;test->test")
|
streamTestkit % "compile->compile;test->test")
|
||||||
.settings(Dependencies.docs)
|
.settings(Dependencies.docs)
|
||||||
.settings(
|
.settings(Paradox.settings)
|
||||||
name in (Compile, paradox) := "Akka",
|
.settings(ParadoxSupport.paradoxWithCustomDirectives)
|
||||||
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}"))
|
|
||||||
.enablePlugins(
|
.enablePlugins(
|
||||||
AkkaParadoxPlugin,
|
AkkaParadoxPlugin,
|
||||||
DeployRsync,
|
DeployRsync,
|
||||||
|
|
@ -255,7 +212,6 @@ lazy val docs = akkaModule("akka-docs")
|
||||||
ParadoxBrowse,
|
ParadoxBrowse,
|
||||||
ScaladocNoVerificationOfDiagrams,
|
ScaladocNoVerificationOfDiagrams,
|
||||||
StreamOperatorsIndexGenerator)
|
StreamOperatorsIndexGenerator)
|
||||||
.settings(ParadoxSupport.paradoxWithCustomDirectives)
|
|
||||||
.disablePlugins(MimaPlugin, WhiteSourcePlugin)
|
.disablePlugins(MimaPlugin, WhiteSourcePlugin)
|
||||||
.disablePlugins(ScalafixPlugin)
|
.disablePlugins(ScalafixPlugin)
|
||||||
|
|
||||||
|
|
@ -496,9 +452,7 @@ lazy val streamTyped = akkaModule("akka-stream-typed")
|
||||||
.enablePlugins(ScaladocNoVerificationOfDiagrams)
|
.enablePlugins(ScaladocNoVerificationOfDiagrams)
|
||||||
|
|
||||||
lazy val actorTestkitTyped = akkaModule("akka-actor-testkit-typed")
|
lazy val actorTestkitTyped = akkaModule("akka-actor-testkit-typed")
|
||||||
.dependsOn(actorTyped,
|
.dependsOn(actorTyped, slf4j, testkit % "compile->compile;test->test")
|
||||||
slf4j,
|
|
||||||
testkit % "compile->compile;test->test")
|
|
||||||
.settings(AutomaticModuleName.settings("akka.actor.testkit.typed"))
|
.settings(AutomaticModuleName.settings("akka.actor.testkit.typed"))
|
||||||
.settings(Dependencies.actorTestkitTyped)
|
.settings(Dependencies.actorTestkitTyped)
|
||||||
|
|
||||||
|
|
|
||||||
74
project/Paradox.scala
Normal file
74
project/Paradox.scala
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2019 Lightbend Inc. <https://www.lightbend.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
package akka
|
||||||
|
|
||||||
|
import com.lightbend.paradox.sbt.ParadoxPlugin
|
||||||
|
import com.lightbend.paradox.sbt.ParadoxPlugin.autoImport._
|
||||||
|
import com.lightbend.paradox.apidoc.ApidocPlugin
|
||||||
|
import sbt.Keys._
|
||||||
|
import sbt._
|
||||||
|
|
||||||
|
object Paradox {
|
||||||
|
|
||||||
|
val propertiesSettings = Seq(
|
||||||
|
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))
|
||||||
|
|
||||||
|
val rootsSettings = Seq(
|
||||||
|
paradoxRoots := List(
|
||||||
|
"index.html",
|
||||||
|
// Page that recommends Alpakka:
|
||||||
|
"camel.html",
|
||||||
|
// TODO page not linked to
|
||||||
|
"fault-tolerance-sample.html"))
|
||||||
|
|
||||||
|
// FIXME https://github.com/lightbend/paradox/issues/350
|
||||||
|
// Exclusions from direct compilation for includes dirs/files not belonging in a TOC
|
||||||
|
val includesSettings = Seq(
|
||||||
|
(Compile / paradoxMarkdownToHtml / excludeFilter) := (Compile / paradoxMarkdownToHtml / excludeFilter).value ||
|
||||||
|
ParadoxPlugin.InDirectoryFilter((Compile / paradox / sourceDirectory).value / "includes"),
|
||||||
|
// Links are interpreted relative to the page the snippet is included in,
|
||||||
|
// instead of relative to the place where the snippet is declared.
|
||||||
|
(Compile / paradoxMarkdownToHtml / excludeFilter) := (Compile / paradoxMarkdownToHtml / excludeFilter).value ||
|
||||||
|
ParadoxPlugin.InDirectoryFilter((Compile / paradox / sourceDirectory).value / "includes.html"))
|
||||||
|
|
||||||
|
val groupsSettings = Seq(Compile / paradoxGroups := Map("Language" -> Seq("Scala", "Java")))
|
||||||
|
|
||||||
|
val settings =
|
||||||
|
propertiesSettings ++
|
||||||
|
rootsSettings ++
|
||||||
|
includesSettings ++
|
||||||
|
groupsSettings ++
|
||||||
|
Seq(
|
||||||
|
name in (Compile, paradox) := "Akka",
|
||||||
|
ApidocPlugin.autoImport.apidocRootPackage := "akka",
|
||||||
|
DeployRsync.autoImport.deployRsyncArtifact := List(
|
||||||
|
(Compile / paradox).value -> s"www/docs/akka/${version.value}"))
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue