Add module documentation and enhance Dokka configuration (#261)

##  #252 Add module documentation and enhance Dokka configuration

## How Has This Been Tested?

`./gradlew :docs:dokkaGenerate`

## Changes

- Add workflow to build and publish API documentation with Dokka
- Introduce `.github/workflows/apidocs.yaml` to build and deploy API
docs on `main` and release events.
  - Configure Gradle for Dokka builds and update project dependencies.
  - Include `:docs` module in project settings.
- Introduce `Module.md` for `kotlin-sdk-server`, `kotlin-sdk-client`,
and `kotlin-sdk-core` modules.
- Update `.gitignore` to include `.idea/icon.png` and add placeholder
icon files
- Remove outdated documentation HTML files

## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update

## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [ ] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [ ] My code follows the repository's style guidelines
- [ ] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [x] I have added or updated documentation as needed

## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->

---------

Co-authored-by: devcrocod <devcrocod@gmail.com>
This commit is contained in:
Konstantin Pavlov 2025-09-15 18:44:43 +03:00 • committed by GitHub
commit 557bc5ef6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,9 +5,14 @@ plugins {
}
dokka {
moduleName.set("MCP Kotlin SDK - ${project.name}")
dokkaSourceSets.configureEach {
includes.from("Module.md")
pluginsConfiguration.html {
footerMessage = "Copyright © 2024-2025 Anthropic, PBC"
}
sourceLink {
localDirectory = projectDir.resolve("src")
remoteUrl("https://github.com/modelcontextprotocol/kotlin-sdk/tree/main/${project.name}/src")
@ -15,9 +20,20 @@ dokka {
}
documentedVisibilities(VisibilityModifier.Public)
}
dokkaPublications.html {
outputDirectory = rootProject.layout.projectDirectory.dir("docs/${project.name}")
externalDocumentationLinks.register("ktor-client") {
url("https://api.ktor.io/ktor-client/")
packageListUrl("https://api.ktor.io/package-list")
}
externalDocumentationLinks.register("kotlinx-coroutines") {
url("https://kotlinlang.org/api/kotlinx.coroutines/")
packageListUrl("https://kotlinlang.org/api/kotlinx.coroutines/package-list")
}
externalDocumentationLinks.register("kotlinx-serialization") {
url("https://kotlinlang.org/api/kotlinx.serialization/")
packageListUrl("https://kotlinlang.org/api/kotlinx.serialization/package-list")
}
}
}
}