Skip to content

Commit 19930d9

Browse files
committed
#196 Update build configuration and workflows for enhanced local publishing and sample builds
- Add `mavenLocal()` to repository configuration in sample projects. - Update dependencies to distinguish between `mcp.kotlin.client` and `mcp.kotlin.server`. - Include `JAVA_OPTS` for optimized memory usage in GitHub workflow. - Enhance build workflow to include local publishing and build steps for sample projects. - Add package-lock.json for Kotlin JS/WASM Store
1 parent 41fc351 commit 19930d9

File tree

11 files changed

+8175
-9
lines changed

11 files changed

+8175
-9
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
validate-pr:
1717
runs-on: macos-latest-xlarge
1818
name: Validate PR
19+
env:
20+
JAVA_OPTS: "-Xmx8g -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dkotlin.daemon.jvm.options=-Xmx6g"
1921
steps:
2022
- uses: actions/checkout@v5
2123

@@ -32,9 +34,19 @@ jobs:
3234
cache-read-only: true
3335

3436
- name: Build with Gradle
35-
run: ./gradlew clean ktlintCheck build koverLog koverHtmlReport
36-
env:
37-
JAVA_OPTS: "-Xmx8g -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dkotlin.daemon.jvm.options=-Xmx6g"
37+
run: ./gradlew clean ktlintCheck build publishToMavenLocal koverLog koverHtmlReport
38+
39+
- name: Build Kotlin-MCP-Client Sample
40+
working-directory: ./samples/kotlin-mcp-client
41+
run: ./../../gradlew clean build
42+
43+
- name: Build Kotlin-MCP-Server Sample
44+
working-directory: ./samples/kotlin-mcp-server
45+
run: ./../../gradlew clean build
46+
47+
- name: Build Weather-Stdio-Server Sample
48+
working-directory: ./samples/weather-stdio-server
49+
run: ./../../gradlew clean build
3850

3951
- name: Upload Reports
4052
if: ${{ !cancelled() }}

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
77
# Kotlin
88
kotlin.code.style=official
99
kotlin.daemon.jvmargs=-Xmx4G
10+
# Build JS targets using npm package manager https://kotlinlang.org/docs/js-project-setup.html#npm-dependencies
11+
kotlin.js.yarn=false
1012
# MPP
1113
kotlin.mpp.enableCInteropCommonization=true
1214
kotlin.native.ignoreDisabledTargets=true

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4
5858
ktor-client-cio = { group = "io.ktor", name = "ktor-client-cio", version.ref = "ktor" }
5959
ktor-server-cio = { group = "io.ktor", name = "ktor-server-cio", version.ref = "ktor" }
6060
mcp-kotlin = { group = "io.modelcontextprotocol", name = "kotlin-sdk", version.ref = "mcp-kotlin" }
61+
mcp-kotlin-client = { group = "io.modelcontextprotocol", name = "kotlin-sdk-client", version.ref = "mcp-kotlin" }
62+
mcp-kotlin-server = { group = "io.modelcontextprotocol", name = "kotlin-sdk-server", version.ref = "mcp-kotlin" }
6163
anthropic-java = { group = "com.anthropic", name = "anthropic-java", version.ref = "anthropic" }
6264
ktor-client-content-negotiation = { group = "io.ktor", name = "ktor-client-content-negotiation", version.ref = "ktor" }
6365
ktor-serialization-kotlinx-json = { group = "io.ktor", name = "ktor-serialization-kotlinx-json", version.ref = "ktor" }

0 commit comments

Comments
 (0)