3

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.

Jilles van Gurp
  • 7,927
  • 4
  • 38
  • 46

2 Answers2

1

Have you tried excluding the tests with perPackageOptions?

1

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"))
Viktor Sirotin
  • 169
  • 1
  • 8