Hide private members in documentation (#30370)

Co-Authored-By: Arnout Engelen <arnout@bzzt.net>

Co-authored-by: Andrei Arlou <andrei.arlou@gmail.com>
This commit is contained in:
Arnout Engelen 2021-07-13 12:25:17 +02:00 committed by GitHub
parent 33e263e731
commit 0ad1783017
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -159,10 +159,21 @@ object UnidocRoot extends AutoPlugin {
UnidocRoot.CliOptions.genjavadocEnabled UnidocRoot.CliOptions.genjavadocEnabled
.ifTrue( .ifTrue(
Seq( Seq(
// akka.stream.scaladsl.GraphDSL.Implicits.ReversePortsOps contains code that
// genjavadoc turns into (probably incorrect) Java code that in turn confuses the javadoc tool.
JavaUnidoc / unidocAllSources ~= { v => JavaUnidoc / unidocAllSources ~= { v =>
v.map(_.filterNot(_.getAbsolutePath.endsWith("scaladsl/GraphDSL.java"))) v.map(_.filterNot(s =>
// akka.stream.scaladsl.GraphDSL.Implicits.ReversePortsOps
// contains code that genjavadoc turns into (probably
// incorrect) Java code that in turn confuses the javadoc
// tool.
s.getAbsolutePath.endsWith("scaladsl/GraphDSL.java") ||
// Since adding -P:genjavadoc:strictVisibility=true,
// the javadoc tool would NullPointerException while
// determining the upper bound for some generics:
s.getAbsolutePath.endsWith("TopicImpl.java") ||
s.getAbsolutePath.endsWith("PersistencePlugin.java") ||
s.getAbsolutePath.endsWith("GraphDelegate.java") ||
s.getAbsolutePath.contains("/impl/")
))
})) }))
.getOrElse(Nil)) .getOrElse(Nil))
} }
@ -186,6 +197,6 @@ object BootstrapGenjavadoc extends AutoPlugin {
override lazy val projectSettings = UnidocRoot.CliOptions.genjavadocEnabled override lazy val projectSettings = UnidocRoot.CliOptions.genjavadocEnabled
.ifTrue(Seq( .ifTrue(Seq(
unidocGenjavadocVersion := "0.17", unidocGenjavadocVersion := "0.17",
Compile / scalacOptions ++= Seq("-P:genjavadoc:fabricateParams=false", "-P:genjavadoc:suppressSynthetic=false"))) Compile / scalacOptions ++= Seq("-P:genjavadoc:fabricateParams=false", "-P:genjavadoc:suppressSynthetic=false", "-P:genjavadoc:strictVisibility=true")))
.getOrElse(Nil) .getOrElse(Nil)
} }