The documentation for this SDK lives at platform.claude.com/docs/en/api/sdks/java. To suggest changes, open an issue.
This repository uses Gradle as its build tool.
To set up the repository, run:
$ ./gradlew buildThis will install all the required dependencies and build the project.
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
result in merge conflicts between manual patches and changes from the generator. The generator will never
modify the contents of the anthropic-java-example/ directory.
All files in the anthropic-java-example/ directory are not modified by the generator and can be freely edited or added to.
# Run an example
$ ./gradlew :anthropic-java-example:runMost tests require you to set up a mock server against the OpenAPI spec to run the tests.
$ npx prism mock path/to/your/openapi.yml$ ./scripts/testThis repository uses ktfmt for Kotlin and palantir-java-format for Java.
To lint:
$ ./scripts/lintTo format:
$ ./scripts/formatChanges made to this repository via the automated release PR pipeline should publish to Maven Central automatically. If the changes aren't made through the automated pipeline, you may want to make releases manually.