How to exclude a particular class in javadoc with (Kdoc Dokka tool)

788 views Asked by At

In the regular Javadoc generation process, we can simply exclude a class or package by adding the below lines.

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

Question: How to exclude/suppress a single Kotlin/java class with the Dokka tool ??

Below is the code to exclude a package.

Is there any option to exclude a particular class?

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

Dokka tool ref: https://kotlinlang.org/docs/kotlin-doc.html

Tool configurations: https://kotlin.github.io/dokka/1.5.0/user_guide/gradle/usage/#configuration-options

1

There are 1 answers

0
AndrewStone On

create a docstring with @suppress in it. For example:

/** @suppress */
fun notDocced() {}

see https://kotlinlang.org/docs/kotlin-doc.html#suppress