From aaca2b4b101d66879ead6e693eb1e9ebafd6bb1c Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Thu, 16 Dec 2021 17:39:27 +0300 Subject: [PATCH] Fix maven plugin configuration overriding the default value --- runners/maven-plugin/src/main/kotlin/DokkaMojo.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt index b73dd4060b..c6e8c60ab5 100644 --- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt +++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt @@ -157,6 +157,9 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List = 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 @@ -204,7 +207,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List