Skip to content

Add a Gradle sample project that runs a packaged-jar conformance test after the jar task #21

Description

@senor14

The README says that with Gradle you should make the test task depend on whichever task builds the jar (jar or bootJar) so a command = ["java", "-jar", "build/libs/..."] test finds the artifact — but the repo has no sample proving that wiring works.

Task: add examples/gradle-packaged-jar/ — a minimal Gradle project (Groovy or Kotlin DSL, your pick) containing a tiny stdio MCP server main class, a build.gradle(.kts) that wires tasks.test { dependsOn(tasks.jar) } (or bootJar if you go Spring Boot), and one @McpServerTest(command = ["java", "-jar", "build/libs/<name>.jar"]) test that runs green with ./gradlew test.

Done when: ./gradlew test passes from a clean checkout on Linux and Windows, and the README's Gradle sentence links to the sample. Keep it small — the point is the wiring, not the server.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions