Add Kotlin Weather STDIO server sample (#50)
* Add Kotlin Weather STDIO server sample * Update gradle build command in Readme to exclude tests
This commit is contained in:
parent
c57c56e18f
commit
0a6490c7f3
1 changed files with 863 additions and 0 deletions
35
samples/weather-stdio-server/build.gradle.kts
Normal file
35
samples/weather-stdio-server/build.gradle.kts
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
plugins {
|
||||
kotlin("jvm") version "2.1.10"
|
||||
kotlin("plugin.serialization") version "2.1.10"
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||
application
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass.set("io.modelcontextprotocol.sample.server.MainKt")
|
||||
}
|
||||
|
||||
|
||||
group = "org.example"
|
||||
version = "0.1.0"
|
||||
|
||||
val mcpVersion = "0.3.0"
|
||||
val slf4jVersion = "2.0.9"
|
||||
val ktorVersion = "3.1.1"
|
||||
|
||||
dependencies {
|
||||
implementation("io.modelcontextprotocol:kotlin-sdk:$mcpVersion")
|
||||
implementation("org.slf4j:slf4j-nop:$slf4jVersion")
|
||||
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
|
||||
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
|
||||
testImplementation(kotlin("test"))
|
||||
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.1")
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
}
|
||||
Loading…
Reference in a new issue