diff --git a/src/main/java/rife/bld/extension/dokka/DokkaOperation.java b/src/main/java/rife/bld/extension/dokka/DokkaOperation.java index ca28adc..76d0ae0 100644 --- a/src/main/java/rife/bld/extension/dokka/DokkaOperation.java +++ b/src/main/java/rife/bld/extension/dokka/DokkaOperation.java @@ -238,6 +238,11 @@ public class DokkaOperation extends AbstractProcessOperation { /** * Sets whether to fail documentation generation if Dokka has emitted a warning or an error. + *

+ * Whether to fail documentation generation if Dokka has emitted a warning or an error. The process waits until all + * errors and warnings have been emitted first. + *

+ * This setting works well with {@link SourceSet#reportUndocumented} * * @param failOnWarning {@code true} or {@code false} * @return this operation instance @@ -335,6 +340,10 @@ public class DokkaOperation extends AbstractProcessOperation { /** * Sets the Markdown files that contain module and package documentation. + *

+ * The contents of specified files are parsed and embedded into documentation as module and package descriptions. + *

+ * This can be configured on per-package basis. * * @param files one or more files * @return this operation instance @@ -345,7 +354,11 @@ public class DokkaOperation extends AbstractProcessOperation { } /** - * Sets the Markdown files that contain module and package documentation. + * Sets the Markdown + *

+ * The contents of specified files are parsed and embedded into documentation as module and package descriptions. + *

+ * This can be configured on per-package basis. * * @param files the list of files * @return this operation instance @@ -368,6 +381,8 @@ public class DokkaOperation extends AbstractProcessOperation { /** * Sets the name of the project/module. Default is {@code root}. + *

+ * The display name used to refer to the module. It is used for the table of contents, navigation, logging, etc. * * @param moduleName the project/module name * @return this operation instance @@ -390,7 +405,15 @@ public class DokkaOperation extends AbstractProcessOperation { /** * Sets whether to suppress obvious functions such as inherited from {@code kotlin.Any} and - * {@link java.lang.Object java.lang.Object}. + * {@link java.lang.Object}. + *

+ * A function is considered to be obvious if it is: + *

* * @param noSuppressObviousFunctions {@code true} or {@code false} * @return this operation instance @@ -402,9 +425,19 @@ public class DokkaOperation extends AbstractProcessOperation { /** * Sets whether to resolve remote files/links over network. + *

+ * This includes package-lists used for generating external documentation links. For example, to make classes from + * the standard library clickable. + *

+ * Setting this to true can significantly speed up build times in certain cases, but can also worsen documentation + * quality and user experience. For example, by not resolving class/member links from your dependencies, including + * the standard library. + *

+ * Note: You can cache fetched files locally and provide them to Dokka as local paths. * * @param offlineMode the offline mode * @return this operation instance + * @see SourceSet#externalDocumentationLinks(String, String) */ public DokkaOperation offlineMode(Boolean offlineMode) { offlineMode_ = offlineMode; @@ -413,6 +446,8 @@ public class DokkaOperation extends AbstractProcessOperation { /** * Sets the output directory path, {@code ./dokka} by default. + *

+ * The directory to where documentation is generated, regardless of output format. * * @param outputDir the output directory * @return this operation instance @@ -518,6 +553,8 @@ public class DokkaOperation extends AbstractProcessOperation { /** * Sets the configurations for a source set. + *

+ * Individual and additional configuration of Kotlin source sets. * * @param sourceSet the source set configurations * @return this operation instance diff --git a/src/main/java/rife/bld/extension/dokka/SourceSet.java b/src/main/java/rife/bld/extension/dokka/SourceSet.java index 4c48116..72e5152 100644 --- a/src/main/java/rife/bld/extension/dokka/SourceSet.java +++ b/src/main/java/rife/bld/extension/dokka/SourceSet.java @@ -51,6 +51,8 @@ public class SourceSet { /** * Sets the platform used for setting up analysis. Default is {@link AnalysisPlatform#JVM} + *

+ * Platform to be used for setting up code analysis and {@code @sample} environment. * * @param analysisPlatform the analysis platform * @return this operation instance @@ -218,6 +220,10 @@ public class SourceSet { /** * Sets classpath for analysis and interactive samples. + *

+ * This is useful if some types that come from dependencies are not resolved/picked up automatically. + *

+ * This option accepts both {@code .jar} and {@code .klib} files. * * @param classpath one or more classpath * @return this operation instance @@ -229,6 +235,10 @@ public class SourceSet { /** * Sets classpath for analysis and interactive samples. + *

+ * This is useful if some types that come from dependencies are not resolved/picked up automatically. + *

+ * This option accepts both {@code .jar} and {@code .klib} files. * * @param classpath the list of classpath * @return this operation instance @@ -264,6 +274,11 @@ public class SourceSet { /** * Sets the display name of the source set, used both internally and externally. + *

+ * The name is used both externally (for example, the source set name is visible to documentation readers) and + * internally (for example, for logging messages of {@link #reportUndocumented}. + *

+ * The platform name can be used if you don't have a better alternative. * * @param displayName the display name * @return this operation instance @@ -275,6 +290,11 @@ public class SourceSet { /** * Sets visibilities to be documented. + *

+ * This can be used if you want to document protected/internal/private declarations, as well as if you want to + * exclude public declarations and only document internal API. + *

+ * This can be configured on per-package basis. * * @param visibilities one or more visibilities * @return this operation instance @@ -286,6 +306,8 @@ public class SourceSet { /** * Sets the external documentation links. + *

+ * A set of parameters for external documentation links that is applied only for this source set. * * @param url the external documentation URL * @param packageListUrl the external documentation package list URL @@ -298,10 +320,12 @@ public class SourceSet { /** * Sets the external documentation links. + *

+ * A set of parameters for external documentation links that is applied only for this source set. * * @param externalDocumentationLinks the map of external documentation links * @return this operation instance - * @see #dependentSourceSets(String, String) + * @see #externalDocumentationLinks(String, String) */ public SourceSet externalDocumentationLinks(Map externalDocumentationLinks) { externalDocumentationLinks_.putAll(externalDocumentationLinks); @@ -310,6 +334,11 @@ public class SourceSet { /** * Sets the Markdown files that contain module and package documentation. + *

+ * A list of Markdown files that contain module and package documentation. + *

+ * The contents of the specified files are parsed and embedded into documentation as module and package + * descriptions. * * @param files one or more files * @return this operation instance @@ -321,6 +350,11 @@ public class SourceSet { /** * Sets the Markdown files that contain module and package documentation. + *

+ * A list of Markdown files that contain module and package documentation. + *

+ * The contents of the specified files are parsed and embedded into documentation as module and package + * descriptions. * * @param files the list of files * @return this operation instance @@ -332,6 +366,11 @@ public class SourceSet { /** * Sets the version of JDK to use for linking to JDK Javadocs. + *

+ * The JDK version to use when generating external documentation links for Java types. + *

+ * For example, if you use {@link java.util.UUID} in some public declaration signature, and this option is set to 8, + * Dokka generates an external documentation link to JDK 8 Javadocs for it. * * @param jdkVersion the JDK version * @return this operation instance @@ -354,6 +393,12 @@ public class SourceSet { /** * Sets whether to generate links to JDK Javadocs. + *

+ * Whether to generate external documentation links to JDK's Javadocs. + *

+ * The version of JDK Javadocs is determined by the {@link #jdkVersion} option. + *

+ * Note: Links are generated when noJdkLink is set to false. * * @param noJdkLink {@code true} or {@code false} * @return this operation instance @@ -365,6 +410,8 @@ public class SourceSet { /** * Sets whether to create pages for empty packages. + *

+ * Whether to skip packages that contain no visible declarations after various filters have been applied. * * @param noSkipEmptyPackages {@code true} or {@code false} * @return this operation instance @@ -376,6 +423,11 @@ public class SourceSet { /** * Sets whether to generate links to Standard library. + *

+ * Whether to generate external documentation links that lead to the API reference documentation of Kotlin's + * standard library. + *

+ * Note: Links are generated when noStdLibLink is set to {@code false}. * * @param noStdlibLink {@code true} or {@code false} * @return this operation instance @@ -386,7 +438,9 @@ public class SourceSet { } /** - * Set the list of package source set configuration in format: + * Set the list of package source set configuration. + *

+ * A set of parameters specific to matched packages within this source set in format: *