-
Notifications
You must be signed in to change notification settings - Fork 116
Refactor samples #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Refactor samples #119
Conversation
There was a problem hiding this 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 refactors the sample modules into the root multi-project build, removes their individual Gradle wrappers and settings, and updates their build scripts to use the central version catalog.
- Consolidate samples under the root project and remove per-sample wrapper files and settings
- Migrate sample build scripts to use the
libs.versions.toml
catalog and aliases - Include new sample modules in
settings.gradle.kts
Reviewed Changes
Copilot reviewed 23 out of 32 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
settings.gradle.kts | Added :samples:... modules to root project |
samples/weather-stdio-server/build.gradle.kts | Updated plugins/dependencies to use version catalog; removed wrapper files |
samples/kotlin-mcp-server/build.gradle.kts | Updated plugins/dependencies to use version catalog; disabled WASM optimize |
samples/kotlin-mcp-client/build.gradle.kts | Updated plugins/dependencies to use version catalog and set mainClass |
gradle/libs.versions.toml | Added sample library and plugin aliases |
Files not reviewed (5)
- samples/kotlin-mcp-server/.idea/.gitignore: Language not supported
- samples/kotlin-mcp-server/.idea/gradle.xml: Language not supported
- samples/kotlin-mcp-server/.idea/kotlinc.xml: Language not supported
- samples/kotlin-mcp-server/.idea/misc.xml: Language not supported
- samples/kotlin-mcp-server/.idea/vcs.xml: Language not supported
Comments suppressed due to low confidence (5)
samples/weather-stdio-server/build.gradle.kts:5
- The application plugin is applied but no
mainClass
is configured, so the entry point won't be recognized. Please add anapplication { mainClass.set("your.main.ClassKt") }
block with the sample's main class.
application
samples/weather-stdio-server/build.gradle.kts:18
- Version catalog alias
slf4j-nop
should be referenced aslibs.slf4jNop
, notlibs.slf4j.nop
.
implementation(libs.slf4j.nop)
samples/weather-stdio-server/build.gradle.kts:19
- Version catalog alias
ktor-client-content-negotiation
should be accessed aslibs.ktorClientContentNegotiation
, notlibs.ktor.client.content.negotiation
.
implementation(libs.ktor.client.content.negotiation)
samples/weather-stdio-server/build.gradle.kts:20
- Version catalog alias
ktor-serialization-kotlinx-json
should be accessed aslibs.ktorSerializationKotlinxJson
, notlibs.ktor.serialization.kotlinx.json
.
implementation(libs.ktor.serialization.kotlinx.json)
samples/kotlin-mcp-client/build.gradle.kts:17
- Version catalog alias
anthropic-java-sdk
should be referenced aslibs.anthropicJavaSdk
, notlibs.anthropic.java.sdk
.
implementation(libs.anthropic.java.sdk)
Instead of having one large build that includes the samples, you could also use an includeBuild aka composite build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR will make samples hard to use as standalone projects and complicate the project structure. Could you tell me why we include them into build?
The rationale behind it is to test the current "development branch" / latest changes with the samples. So I do the benfit of doing that. Does this make sense? 🤔 |
#114
Motivation and Context
How Has This Been Tested?
locally
Breaking Changes
no
Types of changes
Checklist