DokkaExternalDocumentationLinkSpec

abstract class DokkaExternalDocumentationLinkSpec @DokkatooInternalApi @Inject constructor(name: String) : Serializable, Named(source)

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(URI("https://kotlinlang.org/api/kotlinx.serialization/"))
packageListUrl.set(
rootProject.projectDir.resolve("serialization.package.list").toURI()
)
}

Constructors

Link copied to clipboard
constructor(name: String)

Properties

Link copied to clipboard
@get:Input
abstract val enabled: Property<Boolean>

If enabled this link will be passed to the Dokka Generator.

Link copied to clipboard
@get:Input
abstract val packageListUrl: Property<URI>

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
@get:Input
abstract val url: Property<URI>

Root URL of documentation to link with.

Functions

Link copied to clipboard
open override fun getName(): String
Link copied to clipboard

Set the value of packageListUrl.

Link copied to clipboard
fun url(value: String)
fun url(value: Provider<String>)

Set the value of url.