# feat: Add kotlin-sdk-testing module with channel-based transport implementation - Introduced `kotlin-sdk-testing` module for testing utilities in the MCP Kotlin SDK. - Implemented `ChannelTransport`, providing JSON-RPC transport via Kotlin coroutines channels. <!-- Provide a brief summary of your changes --> ## Motivation and Context This ChannelTransport can be used for testing Server implementation without using real transports. ## How Has This Been Tested? Unit test ## Breaking Changes No ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [x] 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. --> - [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
69 lines
1.6 KiB
Kotlin
69 lines
1.6 KiB
Kotlin
import dev.detekt.gradle.extensions.FailOnSeverity
|
|
|
|
plugins {
|
|
id("mcp.dokka")
|
|
alias(libs.plugins.detekt)
|
|
alias(libs.plugins.ktlint)
|
|
alias(libs.plugins.kover)
|
|
}
|
|
|
|
dependencies {
|
|
dokka(project(":kotlin-sdk-core"))
|
|
dokka(project(":kotlin-sdk-client"))
|
|
dokka(project(":kotlin-sdk-server"))
|
|
dokka(project(":kotlin-sdk-testing"))
|
|
|
|
kover(project(":kotlin-sdk-core"))
|
|
kover(project(":kotlin-sdk-client"))
|
|
kover(project(":kotlin-sdk-server"))
|
|
kover(project(":kotlin-sdk-testing"))
|
|
kover(project(":integration-test"))
|
|
}
|
|
|
|
subprojects {
|
|
apply(plugin = "org.jlleitschuh.gradle.ktlint")
|
|
apply(plugin = "org.jetbrains.kotlinx.kover")
|
|
apply(plugin = "dev.detekt")
|
|
|
|
detekt {
|
|
config = files("$rootDir/config/detekt/detekt.yml")
|
|
buildUponDefaultConfig = true
|
|
failOnSeverity.set(FailOnSeverity.Error)
|
|
}
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|