Implement the last version of the mcp schema and complete restructuring of the mcp schema implementation from a monolithic `types.kt` file into separate files. - #158 - #185 - #353 - #298 - #248 ## Motivation and Context The previous implementation of the mcp schema was outdated and contained several issues. In addition, it stored all mcp types in a single large file, which made maintenance and further development more difficult ## How Has This Been Tested? All tests passed ## Breaking Changes Yes. The new types are now located in a separate package. Additionally, many types have new parameters and modified constructors ## Types of changes - [x] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed ## Additional context to adopt the new structure: **Before:** ```kotlin import io.modelcontextprotocol.kotlin.sdk.InitializeRequest import io.modelcontextprotocol.kotlin.sdk.Resource ``` **After:** ```kotlin import io.modelcontextprotocol.kotlin.sdk.types.InitializeRequest import io.modelcontextprotocol.kotlin.sdk.types.Resource ```
57 lines
1.2 KiB
Kotlin
57 lines
1.2 KiB
Kotlin
plugins {
|
|
id("mcp.dokka")
|
|
alias(libs.plugins.ktlint)
|
|
alias(libs.plugins.kover)
|
|
}
|
|
|
|
dependencies {
|
|
dokka(project(":kotlin-sdk-core"))
|
|
dokka(project(":kotlin-sdk-client"))
|
|
dokka(project(":kotlin-sdk-server"))
|
|
|
|
kover(project(":kotlin-sdk-core"))
|
|
kover(project(":kotlin-sdk-client"))
|
|
kover(project(":kotlin-sdk-server"))
|
|
kover(project(":kotlin-sdk-test"))
|
|
}
|
|
|
|
subprojects {
|
|
apply(plugin = "org.jlleitschuh.gradle.ktlint")
|
|
apply(plugin = "org.jetbrains.kotlinx.kover")
|
|
}
|
|
|
|
dokka {
|
|
moduleName = "MCP Kotlin SDK"
|
|
|
|
dokkaPublications.html {
|
|
includes.from("docs/moduledoc.md")
|
|
}
|
|
}
|
|
|
|
ktlint {
|
|
filter {
|
|
exclude("**/generated*/**")
|
|
}
|
|
}
|
|
|
|
kover {
|
|
reports {
|
|
filters {
|
|
includes.classes("io.modelcontextprotocol.kotlin.sdk.*")
|
|
excludes {
|
|
annotatedBy("kotlin.Deprecated")
|
|
classes("io.modelcontextprotocol.kotlin.sdk.models.*") // temporary
|
|
classes("io.modelcontextprotocol.kotlin.sdk.models.infrastructure.*") // generated
|
|
}
|
|
}
|
|
total {
|
|
log {
|
|
}
|
|
verify {
|
|
rule {
|
|
minBound(65)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|