Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KMP: Support for removing test sources from the output #51

Closed
EdricChan03 opened this issue Apr 13, 2023 · 2 comments · Fixed by #52
Closed

KMP: Support for removing test sources from the output #51

EdricChan03 opened this issue Apr 13, 2023 · 2 comments · Fixed by #52
Labels
affects:kotlin-multiplatform Affects Kotlin/Multiplatform projects bug Something isn't working

Comments

@EdricChan03
Copy link
Contributor

EdricChan03 commented Apr 13, 2023

Seems that the test sources are included by default - not sure if Dokka hid it by default, but it would be nice to have an option of excluding test sources from the resulting Dokka output.

Currently, a workaround would be to remove *Test sources by setting suppress to true

@aSemy
Copy link
Contributor

aSemy commented Apr 13, 2023

Thanks for the report, I'll look into it after the Kotlin Multiplatform refactoring being done for #50. I suspect that will also fix this issue.

While the test source sets will be included in the generated dokka_parameters.json files, they should be excluded when they are actually sent to the Dokka generator:

val sourceSets = dokkaSourceSets.filterNot {
val suppressed = it.suppress.get()
logger.info("Dokka source set ${it.sourceSetID.get()} ${if (suppressed) "is" else "isn't"} suppressed")
suppressed
}.map(DokkaSourceSetSpec::build)

I don't think suppressed is encoded to the dokka_parameters.json file, so maybe it's not being respected across subprojects.

@EdricChan03
Copy link
Contributor Author

Test sources also seem to be excluded now as per #50, so I guess this can be closed as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:kotlin-multiplatform Affects Kotlin/Multiplatform projects bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants