Class DokkaOperation
- Since:
- 1.0
- Author:
- Erik C. Thauvin
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSeparator used by Dokka CLI between list items in a single argument value.static final VersionThe Dokka version.Fields inherited from class rife.bld.operations.AbstractProcessOperation
classpath_, DEFAULT_JAVA_TOOL, environment_, errorProcessor_, errorProcessorThread_, javaOptions_, javaTool_, mainClass_, module_, modulePath_, outputProcessor_, outputProcessorThread_, process_, successful_, workDirectory_ -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondelayTemplateSubstitution(boolean delayTemplateSubstitution) Sets the delay substitution of some elements.voidexecute()Performs this operation.Part of theexecuteoperation, constructs the command list to use for building the process.failOnWarning(boolean failOnWarning) Sets whether to fail documentation generation if Dokka has emitted a warning or an error.fromProject(BaseProject project) Configures the operation from aBaseProject.Retrieves the global external documentation links.globalLinks(String url, String packageListUrl) Set the global external documentation links.globalLinks(Map<String, String> globalLinks) Set the global external documentation links.Retrieves the global package configurations.globalPackageOptions(String... options) Sets the global package configurations.final DokkaOperationglobalPackageOptions(Collection<String> options) Sets the global package configurations.Retrieves the global source linksglobalSrcLink(String... links) Sets the global mapping between a source directory and a Web service for browsing the code.final DokkaOperationglobalSrcLink(Collection<String> links) Sets the global mapping between a source directory and a Web service for browsing the code.Retrieves the global list of annotation FQNs to suppress declarations annotated with.globalSuppressAnnotatedWith(String... annotations) Global list of annotation FQNs to suppress declarations annotated with.final DokkaOperationglobalSuppressAnnotatedWith(Collection<String> annotations) Set the global list of annotation FQNs to suppress declarations annotated with.includes()Retrieves the Markdown files that contain the module and package documentation.Sets the Markdown files that contain module and package documentation.Sets the Markdown files that contain module and package documentation.Sets the Markdown files that contain module and package documentation.final DokkaOperationincludes(Collection<File> files) Sets the Markdown files that contain module and package documentation.final DokkaOperationincludesPaths(Collection<Path> files) Sets the Markdown files that contain module and package documentation.final DokkaOperationincludesStrings(Collection<String> files) Sets the Markdown files that contain module and package documentation.json()Retrieves the JSON configuration file path.JSON configuration file path.JSON configuration file path.JSON configuration file path.loggingLevel(LoggingLevel loggingLevel) Sets the logging level.moduleName(String moduleName) Sets the name of the project/module.moduleVersion(String version) Set the documented version.noSuppressObviousFunctions(boolean noSuppressObviousFunctions) Sets whether to suppress obvious functions such as inherited from kotlin.Any andObject.offlineMode(boolean offlineMode) Sets whether to resolve remote files/links over network.Retrieves the output directory path.Sets the output directory path,./dokkaby default.Sets the output directory path,./dokkaby default.Sets the output directory path,./dokkaby default.Retrieves the output format.outputFormat(OutputFormat format) Sets the Dokkaoutput format.Retrieves the plugin configurations.pluginConfigurations(String name, String jsonConfiguration) Sets the configuration for Dokka plugins.pluginConfigurations(Map<String, String> pluginConfigurations) Sets the configuration for Dokka plugins.Retrieves the plugins classpath.pluginsClasspath(File... jars) Sets the jars for Dokka plugins and their dependencies.pluginsClasspath(String... jars) Sets the jars for Dokka plugins and their dependencies.pluginsClasspath(Path... jars) Sets the jars for Dokka plugins and their dependencies.final DokkaOperationpluginsClasspath(Collection<File> jars) Sets the jars for Dokka plugins and their dependencies.final DokkaOperationpluginsClasspathPaths(Collection<Path> jars) Sets the jars for Dokka plugins and their dependencies.final DokkaOperationSets the jars for Dokka plugins and their dependencies.Returns the configurations for the source set.Sets the configurations for a source set.suppressInheritedMembers(boolean suppressInheritedMembers) Sets whether to suppress inherited members that aren't explicitly overridden in a given class.Methods inherited from class rife.bld.operations.AbstractProcessOperation
classpath, classpath, classpath, classpath, classpath, environment, environment, environment, errorProcessor, errorProcessor, executeStartProcess, javaOptions, javaOptions, javaTool, javaTool, mainClass, mainClass, module, module, modulePath, modulePath, modulePath, modulePath, modulePath, outputProcessor, outputProcessor, process, workDirectory, workDirectoryMethods inherited from class rife.bld.operations.AbstractOperation
executeOnce, executeOnce, silent, silent, verbose, verbose
-
Field Details
-
DOKKA_LIST_SEPARATOR
Separator used by Dokka CLI between list items in a single argument value.- See Also:
-
DOKKA_VERSION
The Dokka version.
-
-
Constructor Details
-
DokkaOperation
public DokkaOperation()
-
-
Method Details
-
execute
Performs this operation.- Overrides:
executein classAbstractProcessOperation<DokkaOperation>- Throws:
NullPointerException- ifprojectoroutputformatorsourceSetisnullIllegalArgumentException- ifjsonisnullor does not existIOExceptionInterruptedExceptionExitStatusException
-
executeConstructProcessCommandList
Part of theexecuteoperation, constructs the command list to use for building the process.- Specified by:
executeConstructProcessCommandListin classAbstractProcessOperation<DokkaOperation>- Since:
- 1.5
-
fromProject
Configures the operation from aBaseProject.Sets the
sourceSet,jdkVersion,moduleNameandclasspathfrom the project, if not already set.- Specified by:
fromProjectin classAbstractProcessOperation<DokkaOperation>- Parameters:
project- the project to configure the operation from
-
delayTemplateSubstitution
Sets the delay substitution of some elements.Used in incremental builds of multimodule projects.
- Parameters:
delayTemplateSubstitution- the delay- Returns:
- this operation instance
-
failOnWarning
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
SourceSet.reportUndocumented(boolean)- Parameters:
failOnWarning-trueorfalse- Returns:
- this operation instance
-
globalLinks
Retrieves the global external documentation links.- Returns:
- the documentation links
-
globalLinks
Set the global external documentation links.- Parameters:
url- the external documentation URLpackageListUrl- the external documentation package list URL- Returns:
- this operation instance
- Throws:
NullPointerException- ifurlorpackageListUrlisnullIllegalArgumentException- ifurlorpackageListUrlare blank
-
globalLinks
Set the global external documentation links.- Parameters:
globalLinks- the map of global links- Returns:
- this operation instance
- Throws:
NullPointerException- ifglobalLinksisnullIllegalArgumentException- IfglobalLinksis empty- See Also:
-
globalPackageOptions
Sets the global package configurations.Using format:
- matchingRegexp
- -deprecated
- -privateApi
- +warnUndocumented
- +suppress
- +visibility:PUBLIC
- ...
- Parameters:
options- one or more package configurations- Returns:
- this operation instance
- Throws:
NullPointerException- ifoptionsisnullor containnullelementsIllegalArgumentException- ifoptionsis empty or contains blank elements
-
globalPackageOptions
Sets the global package configurations.Using format:
- matchingRegexp
- -deprecated
- -privateApi
- +warnUndocumented
- +suppress
- +visibility:PUBLIC
- ...
- Parameters:
options- the package configurations- Returns:
- this operation instance
- Throws:
NullPointerException- ifoptionsisnullor containnullelementsIllegalArgumentException- ifoptionsis empty or contains blank elements
-
globalPackageOptions
Retrieves the global package configurations.- Returns:
- the package configurations
-
globalSrcLink
Sets the global mapping between a source directory and a Web service for browsing the code.- Parameters:
links- one or more links mapping- Returns:
- this operation instance
- Throws:
NullPointerException- iflinksisnullor containsnullelementsIllegalArgumentException- iflinksis empty or contains blank elements
-
globalSrcLink
Sets the global mapping between a source directory and a Web service for browsing the code.- Parameters:
links- the links mapping- Returns:
- this operation instance
- Throws:
NullPointerException- iflinksisnullIllegalArgumentException- iflinksis empty or containsnullor empty elements
-
globalSrcLink
Retrieves the global source links- Returns:
- the source links
-
globalSuppressAnnotatedWith
Retrieves the global list of annotation FQNs to suppress declarations annotated with.- Returns:
- the annotations
-
globalSuppressAnnotatedWith
Set the global list of annotation FQNs to suppress declarations annotated with.- Parameters:
annotations- the annotations- Returns:
- this operation instance
- Throws:
NullPointerException- ifannotationsisnullIllegalArgumentException- ifannotationsis empty or containsnullor blank elements
-
globalSuppressAnnotatedWith
Global list of annotation FQNs to suppress declarations annotated with.- Parameters:
annotations- one or more annotation- Returns:
- this operation instance
- Throws:
NullPointerException- ifannotationsisnullor containsnullelementsIllegalArgumentException- ifannoationsis empty or contains blank elements
-
includes
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 a per-package basis.
- Parameters:
files- one or more files- Returns:
- this operation instance
- Throws:
NullPointerException- ifincludesisnullIllegalArgumentException- Ifincludesis empty- See Also:
-
includes
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 a per-package basis.
- Parameters:
files- the Markdown files- Returns:
- this operation instance
- Throws:
NullPointerException- iffilesisnullIllegalArgumentException- Iffilesis empty- See Also:
-
includes
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 a per-package basis.
- Parameters:
files- one or more files- Returns:
- this operation instance
- Throws:
NullPointerException- iffilesisnullor containnullelementsIllegalArgumentException- iffilesis empty or contains blank elements- See Also:
-
includes
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 a per-package basis.
- Parameters:
files- one or more files- Returns:
- this operation instance
- Throws:
NullPointerException- iffilesisnullIllegalArgumentException- Iffilesis empty- See Also:
-
includes
Retrieves the Markdown files that contain the module and package documentation.- Returns:
- the Markdown files
-
includesPaths
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 a per-package basis.
- Parameters:
files- the Markdown files- Returns:
- this operation instance
- Throws:
NullPointerException- iffilesisnullIllegalArgumentException- Iffilesis empty- See Also:
-
includesStrings
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 a per-package basis.
- Parameters:
files- the Markdown files- Returns:
- this operation instance
- Throws:
NullPointerException- iffilesisnullor containnullelementsIllegalArgumentException- iffilesis empty or contains empty elements- See Also:
-
json
JSON configuration file path.- Parameters:
configuration- the configuration file path- Returns:
- this operation instance
- Throws:
NullPointerException- ifconfigurationisnull
-
json
JSON configuration file path.- Parameters:
configuration- the configuration file path- Returns:
- this operation instance
- Throws:
NullPointerException- ifconfigurationisnull
-
json
Retrieves the JSON configuration file path.- Returns:
- the configuration file path
-
json
JSON configuration file path.- Parameters:
configuration- the configuration file path- Returns:
- this operation instance
- Throws:
NullPointerException- ifconfigurationisnullIllegalArgumentException- ifconfigurationis blank
-
loggingLevel
Sets the logging level.- Parameters:
loggingLevel- the logging level- Returns:
- this operation instance
- Throws:
NullPointerException- ifloggingLevelisnull
-
moduleName
Sets the name of the project/module. Default isroot.The display name used to refer to the module. It is used for the table of contents, navigation, logging, etc.
- Parameters:
moduleName- the project/module name- Returns:
- this operation instance
- Throws:
NullPointerException- ifmoduleNameisnullIllegalArgumentException- ifmoduleNameis blank
-
moduleVersion
Set the documented version.- Parameters:
version- the version- Returns:
- this operation instance
- Throws:
NullPointerException- ifversionisnullIllegalArgumentException- ifversionis blank
-
noSuppressObviousFunctions
Sets whether to suppress obvious functions such as inherited from kotlin.Any andObject.A function is considered to be obvious if it is:
- Inherited from kotlin.Any,
Kotlin.Enum,
ObjectorEnum, such asequals,hashCode,toString. - Synthetic (generated by the compiler) and does not have any documentation, such as
dataClass.componentNordataClass.copy.
- Parameters:
noSuppressObviousFunctions-trueorfalse- Returns:
- this operation instance
- Inherited from kotlin.Any,
Kotlin.Enum,
-
offlineMode
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.
- Parameters:
offlineMode- the offline mode- Returns:
- this operation instance
- See Also:
-
outputDir
Retrieves the output directory path.- Returns:
- the output directory
-
outputDir
Sets the output directory path,./dokkaby default.The directory to where documentation is generated, regardless of output format.
- Parameters:
outputDir- the output directory- Returns:
- this operation instance
- Throws:
NullPointerException- ifoutputDirisnullIllegalArgumentException- ifoutputDiris blank
-
outputDir
Sets the output directory path,./dokkaby default.The directory to where documentation is generated, regardless of output format.
- Parameters:
outputDir- the output directory- Returns:
- this operation instance
- Throws:
NullPointerException- ifoutputDirisnull
-
outputDir
Sets the output directory path,./dokkaby default.The directory to where documentation is generated, regardless of output format.
- Parameters:
outputDir- the output directory- Returns:
- this operation instance
- Throws:
NullPointerException- ifoutputDirisnull
-
outputFormat
Retrieves the output format.- Returns:
- the output format
-
outputFormat
Sets the Dokkaoutput format.- Parameters:
format- Theoutput format- Returns:
- this operation instance
- Throws:
NullPointerException- ifformatisnull
-
pluginConfigurations
Sets the configuration for Dokka plugins.- Parameters:
name- The fully qualified plugin namejsonConfiguration- The plugin JSON configuration- Returns:
- this operation instance
- Throws:
NullPointerException- ifnameorjsonConfigurationisnullIllegalArgumentException- ifnameorjsonConfigurationare blank
-
pluginConfigurations
Sets the configuration for Dokka plugins.- Parameters:
pluginConfigurations- the map of configurations- Returns:
- this operation instance
- Throws:
NullPointerException- ifpluginConfigurationsisnullor containnullelementsIllegalArgumentException- IfpluginConfigurationsis empty or contains empty elements- See Also:
-
pluginConfigurations
Retrieves the plugin configurations.- Returns:
- the plugin configurations.
-
pluginsClasspath
Sets the jars for Dokka plugins and their dependencies.- Parameters:
jars- one or more jars- Returns:
- this operation instance
- Throws:
NullPointerException- ifjarsisnullIllegalArgumentException- Ifjarsis empty- See Also:
-
pluginsClasspath
Sets the jars for Dokka plugins and their dependencies.- Parameters:
jars- the jars- Returns:
- this operation instance
- Throws:
NullPointerException- ifjarsisnullIllegalArgumentException- Ifjarsis empty- See Also:
-
pluginsClasspath
Sets the jars for Dokka plugins and their dependencies.- Parameters:
jars- one or more jars- Returns:
- this operation instance
- Throws:
NullPointerException- ifjarsisnullor containnullelementsIllegalArgumentException- ifjarsis empty or contains blank elements- See Also:
-
pluginsClasspath
Sets the jars for Dokka plugins and their dependencies.- Parameters:
jars- one or more jars- Returns:
- this operation instance
- Throws:
NullPointerException- ifjarsisnullor containnullelementsIllegalArgumentException- ifjarsis empty or contains empty elements- See Also:
-
pluginsClasspath
Retrieves the plugins classpath.- Returns:
- the classpath
-
pluginsClasspathPaths
Sets the jars for Dokka plugins and their dependencies.- Parameters:
jars- the jars- Returns:
- this operation instance
- Throws:
NullPointerException- ifjarsisnullIllegalArgumentException- Ifjarsis empty- See Also:
-
pluginsClasspathStrings
Sets the jars for Dokka plugins and their dependencies.- Parameters:
jars- the jars- Returns:
- this operation instance
- Throws:
NullPointerException- ifjarsisnullIllegalArgumentException- Ifjarsis empty- See Also:
-
sourceSet
Returns the configurations for the source set.- Returns:
- the source ser configuration
-
sourceSet
Sets the configurations for a source set.Individual and additional configuration of Kotlin source sets.
- Parameters:
sourceSet- the source set configurations- Returns:
- this operation instance
- Throws:
NullPointerException- ifsourceSetisnull
-
suppressInheritedMembers
Sets whether to suppress inherited members that aren't explicitly overridden in a given class.- Parameters:
suppressInheritedMembers-trueorfalse- Returns:
- this operation instance
-