From 02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Thu, 31 Aug 2023 20:16:01 +0200 Subject: Enable explicit API mode (#3139) --- runners/maven-plugin/src/main/kotlin/DokkaMojo.kt | 80 ++++++++++++----------- 1 file changed, 41 insertions(+), 39 deletions(-) (limited to 'runners/maven-plugin/src/main/kotlin/DokkaMojo.kt') diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt index ef30606a..ba95e7a7 100644 --- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt +++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt @@ -28,7 +28,9 @@ import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink import java.io.File import java.net.URL -abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List) : AbstractMojo() { +public abstract class AbstractDokkaMojo( + private val defaultDokkaPlugins: List +) : AbstractMojo() { @Parameter(defaultValue = "\${project}", readonly = true, required = true) protected var mavenProject: MavenProject? = null @@ -47,10 +49,10 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List = emptyList() + public var sourceDirectories: List = emptyList() /** * List of directories or files that contain sample functions which are referenced via * [@sample](https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier) KDoc tag. */ @Parameter - var samples: List = emptyList() + public var samples: List = emptyList() /** * List of Markdown files that contain @@ -95,7 +97,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List = emptyList() + public var includes: List = emptyList() /** * Classpath for analysis and interactive samples. @@ -106,14 +108,14 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List = emptyList() + public var classpath: List = emptyList() /** * Specifies the location of the project source code on the Web. If provided, Dokka generates * "source" links for each declaration. See [SourceLinkMapItem] for more details. */ @Parameter - var sourceLinks: List = emptyList() + public var sourceLinks: List = emptyList() /** * Display name used to refer to the project/module. Used for ToC, navigation, logging, etc. @@ -121,7 +123,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List = emptyList() + public var perPackageOptions: List = emptyList() /** * Allows linking to Dokka/Javadoc documentation of the project's dependencies. @@ -192,7 +194,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List = emptyList() + public var externalDocumentationLinks: List = emptyList() /** * Whether to generate external documentation links that lead to API reference @@ -201,7 +203,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List = emptyList() + public var suppressedFiles: List = emptyList() /** * Set of visibility modifiers that should be documented. @@ -270,7 +272,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List = DokkaDefaults.documentedVisibilities + public var documentedVisibilities: Set = 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 } @@ -284,7 +286,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List = emptyList() + public var dokkaPlugins: List = emptyList() get() = field + defaultDokkaPlugins @Parameter - var cacheRoot: String? = null + public var cacheRoot: String? = null @Parameter - var platform: String = "" + public var platform: String = "" /** * Deprecated. Use [documentedVisibilities] instead. */ @Parameter - var includeNonPublic: Boolean = DokkaDefaults.includeNonPublic + public var includeNonPublic: Boolean = DokkaDefaults.includeNonPublic protected abstract fun getOutDir(): String @@ -493,7 +495,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List