aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2019-11-28 16:02:13 +0100
committerKamil Doległo <kamilok1965@interia.pl>2019-11-28 16:10:36 +0100
commitd59f77a81fcbc94a074e7b481af299765342a7a2 (patch)
treeda64c51930bfbc13b71a54c8cad1cf54fe3ad49e
parent00f92bd73bfd8cb1e6da40e0bafe43db3f443e5e (diff)
downloaddokka-d59f77a81fcbc94a074e7b481af299765342a7a2.tar.gz
dokka-d59f77a81fcbc94a074e7b481af299765342a7a2.tar.bz2
dokka-d59f77a81fcbc94a074e7b481af299765342a7a2.zip
Fix package suppression
Package suppression depended on the order of `perPackageOption`s. That should not be the case. Fixes https://github.com/Kotlin/dokka/issues/521
-rw-r--r--core/src/main/kotlin/Kotlin/DocumentationBuilder.kt6
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt4
2 files changed, 6 insertions, 4 deletions
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
index 3168e033..666f22fa 100644
--- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
+++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
@@ -423,7 +423,7 @@ class DocumentationBuilder
fun DocumentationModule.appendFragments(fragments: Collection<PackageFragmentDescriptor>,
packageContent: Map<String, Content>,
packageDocumentationBuilder: PackageDocumentationBuilder) {
- val allFqNames = fragments.filter{ it.isDocumented(passConfiguration) }.map { it.fqName }.distinct()
+ val allFqNames = fragments.filter { it.isDocumented(passConfiguration) }.map { it.fqName }.distinct()
for (packageName in allFqNames) {
if (packageName.isRoot && !passConfiguration.includeRootPackage) continue
@@ -1157,7 +1157,9 @@ fun ClassDescriptor.supertypesWithAnyPrecise(): Collection<KotlinType> {
fun PassConfiguration.effectivePackageOptions(pack: String): DokkaConfiguration.PackageOptions {
val rootPackageOptions = PackageOptionsImpl("", includeNonPublic, reportUndocumented, skipDeprecated, false)
- return perPackageOptions.firstOrNull { pack == it.prefix || pack.startsWith(it.prefix + ".") } ?: rootPackageOptions
+ return perPackageOptions.firstOrNull { pack == it.prefix }
+ ?: perPackageOptions.firstOrNull { pack.startsWith(it.prefix + ".") }
+ ?: rootPackageOptions
}
fun PassConfiguration.effectivePackageOptions(pack: FqName): DokkaConfiguration.PackageOptions = effectivePackageOptions(pack.asString())
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt
index 6db1709b..65afad04 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt
@@ -143,8 +143,8 @@ class GradleDokkaConfigurationImpl: DokkaConfiguration {
class GradlePackageOptionsImpl: PackageOptions, Serializable {
override var prefix: String = ""
override var includeNonPublic: Boolean = false
- override var reportUndocumented: Boolean = true
- override var skipDeprecated: Boolean = true
+ override var reportUndocumented: Boolean = false
+ override var skipDeprecated: Boolean = false
override var suppress: Boolean = false
}