File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import org.gradle.api.tasks.bundling.Zip
21import org.gradle.api.tasks.bundling.Jar
2+ import org.gradle.api.tasks.bundling.Zip
3+ import org.gradle.api.plugins.jvm.JvmTestSuite
34
45plugins {
56 // Apply the Java plugin to add support for Java
@@ -26,7 +27,6 @@ dependencies {
2627 // MCP Java SDK
2728 // you can look up the documentation with tool context7
2829 // example implementation: https://modelcontextprotocol.io/sdk/java/mcp-server
29- // version 0.10.0 uses MCP specification version 2024-11-05: https://modelcontextprotocol.io/specification/2024-11-05/basic/transports
3030 implementation(platform(" io.modelcontextprotocol.sdk:mcp-bom:0.11.0" ))
3131 implementation(" io.modelcontextprotocol.sdk:mcp" )
3232 implementation(" jakarta.servlet:jakarta.servlet-api:6.0.0" )
@@ -47,9 +47,14 @@ java {
4747 targetCompatibility = JavaVersion .VERSION_21
4848}
4949
50- tasks.withType<Test > {
51- // Use JUnit Platform for unit tests
52- useJUnitPlatform()
50+ // Configure testing using the Test Suites DSL (avoids deprecated auto-loading in Gradle 9)
51+ testing {
52+ suites {
53+ // Configure the built-in 'test' suite to use JUnit Jupiter
54+ val test by getting(JvmTestSuite ::class ) {
55+ useJUnitJupiter()
56+ }
57+ }
5358}
5459
5560// Configure the Shadow JAR (fat JAR with all dependencies)
You can’t perform that action at this time.
0 commit comments