Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions buildSrc/src/main/kotlin/mcp.multiplatform.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,6 @@ plugins {
id("org.jetbrains.kotlinx.atomicfu")
}

// Generation library versions
val generateLibVersion by tasks.registering {
val outputDir = layout.buildDirectory.dir("generated-sources/libVersion")
outputs.dir(outputDir)

doLast {
val sourceFile = outputDir.get().file("io/modelcontextprotocol/kotlin/sdk/LibVersion.kt").asFile
sourceFile.parentFile.mkdirs()
sourceFile.writeText(
"""
package io.modelcontextprotocol.kotlin.sdk

public const val LIB_VERSION: String = "${project.version}"

""".trimIndent()
)
}
}

kotlin {
jvm {
compilerOptions.jvmTarget = JvmTarget.JVM_1_8
Expand All @@ -41,10 +22,4 @@ kotlin {

explicitApi = ExplicitApiMode.Strict
jvmToolchain(21)

sourceSets {
commonMain {
kotlin.srcDir(generateLibVersion)
}
}
}
4 changes: 0 additions & 4 deletions kotlin-sdk-client/api/kotlin-sdk-client.api
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
public final class io/modelcontextprotocol/kotlin/sdk/LibVersionKt {
public static final field LIB_VERSION Ljava/lang/String;
}

public class io/modelcontextprotocol/kotlin/sdk/client/Client : io/modelcontextprotocol/kotlin/sdk/shared/Protocol {
public fun <init> (Lio/modelcontextprotocol/kotlin/sdk/Implementation;Lio/modelcontextprotocol/kotlin/sdk/client/ClientOptions;)V
public synthetic fun <init> (Lio/modelcontextprotocol/kotlin/sdk/Implementation;Lio/modelcontextprotocol/kotlin/sdk/client/ClientOptions;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
Expand Down
20 changes: 20 additions & 0 deletions kotlin-sdk-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ plugins {
alias(libs.plugins.kotlinx.binary.compatibility.validator)
}

// Generation library versions
val generateLibVersion by tasks.registering {
val outputDir = layout.buildDirectory.dir("generated-sources/libVersion")
outputs.dir(outputDir)

doLast {
val sourceFile = outputDir.get().file("io/modelcontextprotocol/kotlin/sdk/LibVersion.kt").asFile
sourceFile.parentFile.mkdirs()
sourceFile.writeText(
"""
package io.modelcontextprotocol.kotlin.sdk

public const val LIB_VERSION: String = "${project.version}"

""".trimIndent(),
)
}
}
Comment on lines +28 to +30
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Missing comma after the closing parenthesis on line 28. The task configuration should end with a comma for consistency with Gradle Kotlin DSL style.

Copilot uses AI. Check for mistakes.

kotlin {
iosArm64()
iosX64()
Expand All @@ -31,6 +50,7 @@ kotlin {

sourceSets {
commonMain {
kotlin.srcDir(generateLibVersion)
dependencies {
api(libs.kotlinx.serialization.json)
api(libs.kotlinx.coroutines.core)
Expand Down
4 changes: 0 additions & 4 deletions kotlin-sdk-server/api/kotlin-sdk-server.api
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
public final class io/modelcontextprotocol/kotlin/sdk/LibVersionKt {
public static final field LIB_VERSION Ljava/lang/String;
}

public final class io/modelcontextprotocol/kotlin/sdk/server/KtorServerKt {
public static final fun MCP (Lio/ktor/server/application/Application;Lkotlin/jvm/functions/Function1;)V
public static final fun mcp (Lio/ktor/server/application/Application;Lkotlin/jvm/functions/Function1;)V
Expand Down
Loading