0

在常规的 Javadoc 生成过程中,我们可以通过添加以下行来简单地排除类或包。

exclude '**/SampleClass.java' exclude '**/com/example/java**'

问题:如何使用Dokka 工具排除/抑制单个 Kotlin/java 类?

下面是排除的代码是否有排除特定类的选项?

           perPackageOption {
                matchingRegex.set("com.example.xxx.xxx.package.*")
                suppress.set(true)
            }

Dokka 工具参考https ://kotlinlang.org/docs/kotlin-doc.html

工具配置: https ://kotlin.github.io/dokka/1.5.0/user_guide/gradle/usage/#configuration-options

4

1 回答 1

0

have you found the solution?</p>

I have searched the github issue of dokka, and this one seems useful: https://github.com/Kotlin/dokka/issues/1705

It recommends to use 'sourceRoots.setFrom'.

Actually I am also looking for a way to achieve, but that method didn't work for me: If I use dokka which version is 1.4.0, it can generate the blank html(I use dokkaHtml); but if I use version 1.6.10, it even generate nothing!</p>

So did you succeed? can you share with me

于 2022-03-04T05:55:39.307 回答