GradleExternalDocumentationLinkBuilder

class GradleExternalDocumentationLinkBuilder(project: Project) : DokkaConfigurationBuilder<ExternalDocumentationLinkImpl>

Configuration builder that allows creating links leading to externally hosted documentation of your dependencies.

For instance, if you are using types from kotlinx.serialization, by default they will be unclickable in your documentation, as if unresolved. However, since API reference for kotlinx.serialization is also built by Dokka and is published on kotlinlang.org, you can configure external documentation links for it, allowing Dokka to generate documentation links for used types, making them clickable and appear resolved.

Example in Gradle Kotlin DSL:

externalDocumentationLink {
url.set(URL("https://kotlinlang.org/api/kotlinx.serialization/"))
packageListUrl.set(
rootProject.projectDir.resolve("serialization.package.list").toURL()
)
}

Constructors

Link copied to clipboard
constructor(project: Project)

Properties

Link copied to clipboard
@Optional
@Input
val packageListUrl: Property<URL>

Specifies the exact location of a package-list instead of relying on Dokka automatically resolving it. Can also be a locally cached file to avoid network calls.

Link copied to clipboard
@Input
val url: Property<URL>

Root URL of documentation to link with. Must contain a trailing slash.

Functions

Link copied to clipboard
open override fun build(): ExternalDocumentationLinkImpl