Publish API reference (Dokka HTML) to GitHub Pages (#32) (#40)

* docs: design spec for Dokka HTML API reference on GitHub Pages (#32)

* docs: implementation plan for Dokka API reference on GitHub Pages (#32)

* build: migrate Dokka 1.9.20 -> 2.2.0 (DGP v2) (#32)

* docs: aggregate all modules into one Dokka HTML site with source links (#32)

* docs: add Dokka source links to serialization/coroutines/compose modules (#32)

* ci: add docs workflow to deploy Dokka HTML to GitHub Pages (#32)

* docs: link the published API reference from the README (#32)
This commit is contained in:
2026-06-07 21:48:58 +02:00
committed by GitHub
parent 100054585f
commit 1f60b854de
10 changed files with 787 additions and 1 deletions

View File

@@ -59,6 +59,29 @@ repositories {
mavenCentral()
}
dependencies {
// Include this module's own docs in the aggregation — DGP v2 requires the
// aggregating project to list itself explicitly.
dokka(project(":"))
dokka(project(":tree-structure-serialization"))
dokka(project(":tree-structure-coroutines"))
dokka(project(":tree-structure-compose"))
}
dokka {
moduleName.set("Tree Data Structure")
dokkaSourceSets.configureEach {
sourceLink {
localDirectory.set(projectDir.resolve("src"))
// For the root project projectDir == rootDir, so `module` is "" and links resolve to /blob/master/src.
val module = projectDir.relativeTo(rootDir).invariantSeparatorsPath
val prefix = if (module.isEmpty()) "" else "$module/"
remoteUrl("https://github.com/AdrianKuta/Tree-Data-Structure/blob/master/${prefix}src")
remoteLineSuffix.set("#L")
}
}
}
kotlin {
explicitApi()
jvmToolchain(21)