You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by fa...@apache.org on 2023/07/10 13:19:16 UTC
[incubator-pekko] branch main updated: Make unidoc generate external javadoc links (#477)
This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 2b2d325006 Make unidoc generate external javadoc links (#477)
2b2d325006 is described below
commit 2b2d3250068311d911dcd782c2b89a1667fba861
Author: Naoki Yamada <52...@users.noreply.github.com>
AuthorDate: Mon Jul 10 22:19:11 2023 +0900
Make unidoc generate external javadoc links (#477)
* make unidoc generate external javadoc links (#353)
* Move code of updating apiMappings
---
project/Doc.scala | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/project/Doc.scala b/project/Doc.scala
index 1ef34943fa..bc7127b35c 100644
--- a/project/Doc.scala
+++ b/project/Doc.scala
@@ -156,6 +156,24 @@ object UnidocRoot extends AutoPlugin {
Seq(
ScalaUnidoc / unidocProjectFilter := unidocRootProjectFilter(unidocRootIgnoreProjects.value),
JavaUnidoc / unidocProjectFilter := unidocRootProjectFilter(unidocRootIgnoreProjects.value),
+ Compile / doc / apiMappings ++= {
+ val entries: Seq[Attributed[File]] = (LocalProject("slf4j") / Compile / fullClasspath).value
+
+ def mappingsFor(organization: String, names: List[String], location: String,
+ revision: String => String = identity): Seq[(File, URL)] = {
+ for {
+ entry: Attributed[File] <- entries
+ module: ModuleID <- entry.get(moduleID.key)
+ if module.organization == organization
+ if names.exists(module.name.startsWith)
+ } yield entry.data -> url(location.format(module.revision))
+ }
+
+ val mappings: Seq[(File, URL)] =
+ mappingsFor("org.slf4j", List("slf4j-api"), "https://www.javadoc.io/doc/org.slf4j/slf4j-api/%s/")
+
+ mappings.toMap
+ },
ScalaUnidoc / apiMappings := (Compile / doc / apiMappings).value) ++
UnidocRoot.CliOptions.genjavadocEnabled
.ifTrue(Seq(JavaUnidoc / unidocAllSources ~= { v =>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org