diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2017-02-24 11:33:17 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2017-02-24 11:40:16 +0100 |
commit | bfd615dde13ef6ebbfaca6b042f263a57c11018c (patch) | |
tree | 10f91003d6bee78c236ae86b4671864a591689f7 /core/src/main/kotlin/Kotlin | |
parent | edb0d90fbc44f611d806a06a12f1d8280e274b8e (diff) | |
download | dokka-bfd615dde13ef6ebbfaca6b042f263a57c11018c.tar.gz dokka-bfd615dde13ef6ebbfaca6b042f263a57c11018c.tar.bz2 dokka-bfd615dde13ef6ebbfaca6b042f263a57c11018c.zip |
Option to skip declarations in root package from generated documentation (they can't be imported anyway)
Diffstat (limited to 'core/src/main/kotlin/Kotlin')
-rw-r--r-- | core/src/main/kotlin/Kotlin/DocumentationBuilder.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt index 10b5c598..4974b765 100644 --- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt +++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt @@ -33,6 +33,7 @@ import com.google.inject.name.Named as GuiceNamed data class DocumentationOptions(val outputDir: String, val outputFormat: String, val includeNonPublic: Boolean = false, + val includeRootPackage: Boolean = false, val reportUndocumented: Boolean = true, val skipEmptyPackages: Boolean = true, val skipDeprecated: Boolean = false, @@ -337,6 +338,7 @@ class DocumentationBuilder val allFqNames = fragments.map { it.fqName }.distinct() for (packageName in allFqNames) { + if (packageName.isRoot && !options.includeRootPackage) continue val declarations = fragments.filter { it.fqName == packageName }.flatMap { it.getMemberScope().getContributedDescriptors() } if (options.skipEmptyPackages && declarations.none { it.isDocumented(options) }) continue |