kotlin-sdk/build.gradle.kts
Pavel Gorgulov e88b34170c
feat!: add mcp conformance test infra (#585); add SSE reconnection with retry support (#596) (#585)
Adds a comprehensive conformance test suite for the Kotlin MCP SDK,
covering core protocol operations, tool calls, elicitation, resources,
prompts, and 20 OAuth/auth scenarios

- Conformance server and client implementations
- OAuth/auth test scenarios: JWT, authorization code flow, client
credentials, PKCE, scope handling, cross-app access, client registration
- CI workflow
- Baseline file for tracking expected failures
- Shell script

fixes:
- #592
- #593
- #596


## Remaining known failures (tracked issues, will be fixed directly in
`main`)

- [x] `tools-call-with-logging`, `tools-call-with-progress`,
`tools-call-sampling`, `tools-call-elicitation`,
`elicitation-sep1034-defaults`-  see #599,
- [x] `elicitation-sep1330-enums` - #587 #600
- [x] `initialize` - #588 
- [x] `tools_call`, `auth/scope-step-up`, `auth/scope-retry-limit` -
#589
- [ ] `elicitation-sep1034-client-defaults` - #414 
- [x] `sse-retry` - #590 
- [ ] `resources-templates-read` - #591 

## Breaking Changes
from #596 
- `StreamableHttpClientTransport` and
`mcpStreamableHttp`/`mcpStreamableHttpTransport`: old constructors
accepting `Duration` timeout are now `@Deprecated` — use the new
overloads with `ReconnectionOptions` instead
- `StreamableHttpClientTransport.close()` no longer calls
`terminateSession()` automatically

## 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

---------

Co-authored-by: Konstantin Pavlov <1517853+kpavlov@users.noreply.github.com>
2026-03-12 15:44:59 +02:00

72 lines
1.7 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")
if (name != "conformance-test" && name != "docs") {
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(73)
}
}
}
}
}