# Migrate Ktor extension functions from `Routing` to `Route` (#237) - Replaced `Routing` with `Route` in MCP-related functions for better composability in nested contexts. - Updated tests to verify compatibility with nested routes and subpaths. - Deprecated legacy signatures and removed redundant overloads. ## How Has This Been Tested? Unit test ## Breaking Changes `Routing.mcp(...) `extension was replaced with `Route.mcp(...)` ## Types of changes - [X] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change) - [ ] 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 - [ ] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed ## Additional context Based on #314 by @IainHull but that PR is too outdated.
42 lines
1.3 KiB
Kotlin
42 lines
1.3 KiB
Kotlin
plugins {
|
|
id("mcp.multiplatform")
|
|
id("mcp.publishing")
|
|
id("mcp.dokka")
|
|
alias(libs.plugins.kotlinx.binary.compatibility.validator)
|
|
}
|
|
|
|
kotlin {
|
|
sourceSets {
|
|
commonMain {
|
|
dependencies {
|
|
api(project(":kotlin-sdk-core"))
|
|
api(libs.ktor.server.core)
|
|
api(libs.ktor.server.sse)
|
|
implementation(libs.ktor.server.websockets)
|
|
implementation(libs.kotlin.logging)
|
|
}
|
|
}
|
|
|
|
commonTest {
|
|
dependencies {
|
|
implementation(kotlin("test"))
|
|
implementation(libs.kotest.assertions.core)
|
|
implementation(libs.kotest.assertions.json)
|
|
implementation(libs.kotlinx.coroutines.test)
|
|
}
|
|
}
|
|
|
|
jvmTest {
|
|
dependencies {
|
|
implementation(libs.kotest.assertions.ktor)
|
|
implementation(libs.ktor.client.content.negotiation)
|
|
implementation(libs.ktor.client.logging)
|
|
implementation(libs.ktor.serialization)
|
|
implementation(libs.ktor.server.content.negotiation)
|
|
implementation(libs.ktor.server.test.host)
|
|
|
|
runtimeOnly(libs.slf4j.simple)
|
|
}
|
|
}
|
|
}
|
|
}
|