aboutsummaryrefslogtreecommitdiff
path: root/runners/maven-plugin/src/main/kotlin
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat@beresnev.me>2021-12-23 14:32:18 +0300
committerGitHub <noreply@github.com>2021-12-23 14:32:18 +0300
commitbfd41ce2a0d43419a671961c19b7d755cffdcfc8 (patch)
tree00d1fcd75ff7c25de20c8b0621e3bfb11cd3f61a /runners/maven-plugin/src/main/kotlin
parent5c98d42ec08ca1413f920e4f5dde28d330e8837a (diff)
downloaddokka-bfd41ce2a0d43419a671961c19b7d755cffdcfc8.tar.gz
dokka-bfd41ce2a0d43419a671961c19b7d755cffdcfc8.tar.bz2
dokka-bfd41ce2a0d43419a671961c19b7d755cffdcfc8.zip
Introduce documentedVisibilities setting (#2270)
* Introduce `documentedVisibilities` setting * Remove hardcoded doc generation for Visibility.PUBLIC, correct tests * Add maven, gradle and cli integration tests for documentedVisibilities * Fix maven plugin configuration overriding the default value * Remove test debug prints * Correct an inconsistency with default values and leave a comment of intentions * Add a test for visibility of private setter
Diffstat (limited to 'runners/maven-plugin/src/main/kotlin')
-rw-r--r--runners/maven-plugin/src/main/kotlin/DokkaMojo.kt11
1 files changed, 11 insertions, 0 deletions
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
index 58039ab9..87c58edb 100644
--- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
+++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
@@ -78,6 +78,9 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc
@Parameter
override var suppress: Boolean = DokkaDefaults.suppress
+
+ @Parameter(property = "visibility")
+ override var documentedVisibilities: Set<DokkaConfiguration.Visibility> = DokkaDefaults.documentedVisibilities
}
@Parameter
@@ -152,6 +155,12 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc
@Parameter
var includeNonPublic: Boolean = DokkaDefaults.includeNonPublic
+ @Parameter(property = "visibility")
+ var documentedVisibilities: Set<DokkaConfiguration.Visibility> = DokkaDefaults.documentedVisibilities
+ // hack to set the default value for lists, didn't find any other safe way
+ // maven seems to overwrite Kotlin's default initialization value, so it doesn't matter what you put there
+ get() = field.ifEmpty { DokkaDefaults.documentedVisibilities }
+
@Parameter
var failOnWarning: Boolean = DokkaDefaults.failOnWarning
@@ -198,6 +207,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc
samples = samples.map(::File).toSet(),
includes = includes.map(::File).toSet(),
includeNonPublic = includeNonPublic,
+ documentedVisibilities = documentedVisibilities,
reportUndocumented = reportUndocumented,
skipEmptyPackages = skipEmptyPackages,
skipDeprecated = skipDeprecated,
@@ -207,6 +217,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc
PackageOptionsImpl(
matchingRegex = it.matchingRegex,
includeNonPublic = it.includeNonPublic,
+ documentedVisibilities = it.documentedVisibilities,
reportUndocumented = it.reportUndocumented,
skipDeprecated = it.skipDeprecated,
suppress = it.suppress