This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
# Full build
./gradlew --no-daemon build
# Run tests for a specific subproject
./gradlew --no-daemon :docling-serve-client:test
# Run a specific test class
./gradlew --no-daemon :docling-serve-client:test --tests "ai.docling.serve.client.SomeTestClass"
# Lint check (enforces import order + whitespace rules)
./gradlew --no-daemon spotlessCheck
# Auto-apply formatting fixes
./gradlew --no-daemon spotlessApplyThis is a multi-module Gradle project (Kotlin DSL) with group ai.docling. Version is managed in .github/project.yml under release.current-version.
docling-core: Java types mirroring the docling-core Python library's document representation model. Uses Lombok and JSpecify. Jackson is acompileOnlydependency — consumers must bring their own.docling-serve-api(docling-serve/docling-serve-api): Framework-agnostic API interfaces for interacting with a Docling Serve backend. DefinesDoclingServeApi(extendsDoclingServeHealthApi,DoclingServeConvertApi,DoclingServeChunkApi,DoclingServeClearApi,DoclingServeTaskApi) and the SPI interfaceDoclingServeApiBuilderFactoryused for discovery viajava.util.ServiceLoader.docling-serve-client(docling-serve/docling-serve-client): Reference implementation using Java'sHttpClient. ProvidesDoclingServeJackson2ClientandDoclingServeJackson3Client— concrete implementations for Jackson 2.x and 3.x respectively.DoclingServeClient(abstract) contains all HTTP logic.docling-testcontainers: Testcontainers module exposingDoclingServeContainerfor spinning up a Docling Serve Docker container in tests.docling-testing/docling-version-tests: Internal tooling for running compatibility tests across Docling Serve container versions.
SPI for client discovery: DoclingServeApi.builder() uses ServiceLoader to discover a DoclingServeApiBuilderFactory. Exactly one implementation must be on the classpath — having zero or more than one throws IllegalStateException. The docling-serve-client module registers itself as the factory.
Dual Jackson support: All Jackson dependencies are compileOnly in production code. Jackson 2.x and 3.x are both supported through parallel implementations. Consumers must include one Jackson version on their classpath.
Java modules: All publishable modules include module-info.java. The docling-lombok.gradle.kts convention plugin temporarily renames module-info.java during the Lombok delombok task to avoid module processing issues.
docling-shared: Sets group/version from.github/project.ymldocling-java-shared: Appliesdocling-shared,java-library,jacoco,spotless; configures JUnit Jupiter, AssertJ, parallel test execution, and test loggingdocling-lombok: Appliesio.freefair.lombokwithmodule-info.javaworkarounddocling-release: Configuresmaven-publishfor publishing to Maven Central
- Java 17 (minimum), tested against 17, 21, 25 (all LTS)
- Lombok for boilerplate reduction
- JSpecify for nullability annotations (
@Nullable) - JUnit Jupiter + AssertJ for testing
- WireMock for HTTP mocking in tests
- SLF4J for logging
- Spotless enforces import order (see
.spotless/import-order.txt)
- Commits must follow Conventional Commits
- All commits must include DCO sign-off (
git commit -s) spotlessusesratchetFrom("origin/main")— only files changed relative toorigin/mainare checked- Line endings: LF; no trailing whitespace; files must end with a newline (
.editorconfig)