Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude samples from dokka documentation

I pointed the dokka samples directory to my test sources so I could refer test methods with @sample in my documentation and have examples that are tested. This works, except now dokka generates documentation for my tests as well, which is obviously not what I want.

Is there a way to avoid that? I want no trace of my samples or tests in my documentation other than the bits I refer with @sample.

like image 538
Jilles van Gurp Avatar asked Feb 11 '26 15:02

Jilles van Gurp


2 Answers

Have you tried excluding the tests with perPackageOptions?

like image 110
Kamil Doległo Avatar answered Feb 17 '26 22:02

Kamil Doległo


I have had a similar problem with dokkaHtml. The example from here help me. I use:

dokkaSourceSets {
    configureEach {
        suppressedFiles.from(file("src/main/kotlin/it/suppressedByPath"))
like image 24
Viktor Sirotin Avatar answered Feb 17 '26 23:02

Viktor Sirotin