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()
)
}
Content copied to clipboard