DokkaSourceLinkSpec
abstract class DokkaSourceLinkSpec @DokkatooInternalApi @Inject constructor(layout: ProjectLayout) : Serializable(source)
Configuration builder that allows adding a source
link to each signature which leads to remoteUrl with a specific line number (configurable by setting remoteLineSuffix), letting documentation readers find source code for each declaration.
Example in Gradle Kotlin DSL:
sourceLink {
localDirectory.set(projectDir.resolve("src"))
remoteUrl.set(URI("https://github.com/kotlin/dokka/tree/master/src"))
remoteLineSuffix.set("#L")
}
Content copied to clipboard
Properties
Link copied to clipboard
Path to the local source directory. The path must be relative to the root of current project.
Link copied to clipboard
Suffix used to append source code line number to the URL. This will help readers navigate not only to the file, but to the specific line number of the declaration.