Skip to content

Conversation

@IRus
Copy link
Contributor

@IRus IRus commented Nov 11, 2025

Remove ktor-bom from the project dependencies

Motivation and Context

kotlin-mcp should be usable without applying ktor-bom #390

How Has This Been Tested?

By running generatePomFileForJvmPublication and validating pom:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!-- This module was also published with a richer model, Gradle metadata,  -->
  <!-- which should be used instead. Do not delete the following line which  -->
  <!-- is to indicate to Gradle or any Gradle module metadata file consumer  -->
  <!-- that they should prefer consuming it instead. -->
  <!-- do_not_remove: published-with-gradle-metadata -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.modelcontextprotocol</groupId>
  <artifactId>kotlin-sdk-client-jvm</artifactId>
  <version>0.8.0-SNAPSHOT</version>
  <name>kotlin-sdk-client</name>
  <description>Kotlin implementation of the Model Context Protocol (MCP)</description>
  <url>https://github.com/modelcontextprotocol/kotlin-sdk</url>
  <organization>
    <name>Anthropic</name>
    <url>https://www.anthropic.com</url>
  </organization>
  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://github.com/modelcontextprotocol/kotlin-sdk/blob/main/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>JetBrains</id>
      <name>JetBrains Team</name>
      <organization>JetBrains</organization>
      <organizationUrl>https://www.jetbrains.com</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/modelcontextprotocol/kotlin-sdk.git</connection>
    <developerConnection>scm:git:git@github.com:modelcontextprotocol/kotlin-sdk.git</developerConnection>
    <url>https://github.com/modelcontextprotocol/kotlin-sdk</url>
  </scm>
  <dependencies>
    <dependency>
      <groupId>io.modelcontextprotocol</groupId>
      <artifactId>kotlin-sdk-core-jvm</artifactId>
      <version>0.8.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.ktor</groupId>
      <artifactId>ktor-client-core-jvm</artifactId>
      <version>3.2.3</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib</artifactId>
      <version>2.2.21</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.github.oshai</groupId>
      <artifactId>kotlin-logging-jvm</artifactId>
      <version>7.0.13</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</project>

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • 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

Copilot AI review requested due to automatic review settings November 11, 2025 20:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a dependency management issue where kotlin-mcp couldn't be used without the ktor-bom starting from version 0.7.5. The fix explicitly adds version references to all Ktor dependencies so they can be resolved independently.

Key Changes:

  • Added explicit version references (version.ref = "ktor") to all Ktor dependency declarations in the Gradle version catalog

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@IRus
Copy link
Contributor Author

IRus commented Nov 11, 2025

Pom generated on current main HEAD:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!-- This module was also published with a richer model, Gradle metadata,  -->
  <!-- which should be used instead. Do not delete the following line which  -->
  <!-- is to indicate to Gradle or any Gradle module metadata file consumer  -->
  <!-- that they should prefer consuming it instead. -->
  <!-- do_not_remove: published-with-gradle-metadata -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.modelcontextprotocol</groupId>
  <artifactId>kotlin-sdk-client-jvm</artifactId>
  <version>0.8.0-SNAPSHOT</version>
  <name>kotlin-sdk-client</name>
  <description>Kotlin implementation of the Model Context Protocol (MCP)</description>
  <url>https://github.com/modelcontextprotocol/kotlin-sdk</url>
  <organization>
    <name>Anthropic</name>
    <url>https://www.anthropic.com</url>
  </organization>
  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://github.com/modelcontextprotocol/kotlin-sdk/blob/main/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>JetBrains</id>
      <name>JetBrains Team</name>
      <organization>JetBrains</organization>
      <organizationUrl>https://www.jetbrains.com</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/modelcontextprotocol/kotlin-sdk.git</connection>
    <developerConnection>scm:git:git@github.com:modelcontextprotocol/kotlin-sdk.git</developerConnection>
    <url>https://github.com/modelcontextprotocol/kotlin-sdk</url>
  </scm>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.ktor</groupId>
        <artifactId>ktor-bom</artifactId>
        <version>3.2.3</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>io.modelcontextprotocol</groupId>
      <artifactId>kotlin-sdk-core-jvm</artifactId>
      <version>0.8.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.ktor</groupId>
      <artifactId>ktor-client-core</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib</artifactId>
      <version>2.2.21</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.github.oshai</groupId>
      <artifactId>kotlin-logging-jvm</artifactId>
      <version>7.0.13</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</project>

@kpavlov kpavlov requested a review from devcrocod November 12, 2025 08:35
@kpavlov kpavlov added the bugfix Something was fixed 🎉 label Nov 12, 2025
Copy link
Contributor

@devcrocod devcrocod left a comment

Choose a reason for hiding this comment

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

LGTM

@kpavlov kpavlov merged commit 31fd6d9 into modelcontextprotocol:main Nov 12, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something was fixed 🎉

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants