From a96d56b1b24572b5d0a90e87c5dc733bd2d803ff Mon Sep 17 00:00:00 2001 From: Eric Deandrea Date: Mon, 4 May 2026 12:44:17 -0400 Subject: [PATCH] feat: add Maven BOM module for aligned dependency management Add a `docling-bom` module (`ai.docling:docling-bom`) using Gradle's `java-platform` plugin that defines version constraints for all published modules: docling-core, docling-serve-api, docling-serve-client, and docling-testcontainers. Refactor `docling-release.gradle.kts` to conditionally handle `java-platform` modules by selecting the correct component type (`javaPlatform` vs `java`) and skipping SBOM generation for BOM modules. Update whats-new.md with release summaries for missing versions and document the new BOM module. Closes #481 Assisted-By: Claude Code Signed-off-by: Eric Deandrea --- .../main/kotlin/docling-release.gradle.kts | 31 ++++++++++------ docling-bom/build.gradle.kts | 16 +++++++++ docs/src/doc/docs/whats-new.md | 35 ++++++++++++++++++- settings.gradle.kts | 2 +- 4 files changed, 71 insertions(+), 13 deletions(-) create mode 100644 docling-bom/build.gradle.kts diff --git a/buildSrc/src/main/kotlin/docling-release.gradle.kts b/buildSrc/src/main/kotlin/docling-release.gradle.kts index 337dc6a8..99b19e68 100644 --- a/buildSrc/src/main/kotlin/docling-release.gradle.kts +++ b/buildSrc/src/main/kotlin/docling-release.gradle.kts @@ -1,8 +1,13 @@ plugins { - id("docling-sbom") `maven-publish` } +val isJavaPlatform = pluginManager.hasPlugin("java-platform") + +if (!isJavaPlatform) { + apply(plugin = "docling-sbom") +} + publishing { repositories { maven { @@ -12,18 +17,22 @@ publishing { publications { create("maven") { - from(components["java"]) - - // Attach SBOM artifacts to publication - val cyclonedxTask = tasks.named("cyclonedxDirectBom").get() - artifact(cyclonedxTask.jsonOutput) { - classifier = "cyclonedx" - extension = "json" + if (isJavaPlatform) { + from(components["javaPlatform"]) } + else { + from(components["java"]) - artifact(cyclonedxTask.xmlOutput) { - classifier = "cyclonedx" - extension = "xml" + val cyclonedxTask = tasks.named("cyclonedxDirectBom").get() + artifact(cyclonedxTask.jsonOutput) { + classifier = "cyclonedx" + extension = "json" + } + + artifact(cyclonedxTask.xmlOutput) { + classifier = "cyclonedx" + extension = "xml" + } } pom { diff --git a/docling-bom/build.gradle.kts b/docling-bom/build.gradle.kts new file mode 100644 index 00000000..15225424 --- /dev/null +++ b/docling-bom/build.gradle.kts @@ -0,0 +1,16 @@ +plugins { + `java-platform` + id("docling-shared") + id("docling-release") +} + +description = "Docling Java BOM" + +dependencies { + constraints { + api(project(":docling-core")) + api(project(":docling-serve-api")) + api(project(":docling-serve-client")) + api(project(":docling-testcontainers")) + } +} diff --git a/docs/src/doc/docs/whats-new.md b/docs/src/doc/docs/whats-new.md index 81eb939f..693768ca 100644 --- a/docs/src/doc/docs/whats-new.md +++ b/docs/src/doc/docs/whats-new.md @@ -2,10 +2,28 @@ Docling Java {{ gradle.project_version }} includes important breaking changes, along with new features, enhancements, and bug fixes. This page includes the highlights of the release, but you can also check out the full [release notes](https://github.com/docling-project/docling-java/releases) for more details about each change. +## General + +### {{ gradle.project_version }} + +* **New `docling-bom` module** — A Maven BOM (`ai.docling:docling-bom`) is now published, allowing consumers to align all Docling Java module versions with a single import. + +### 0.5.1 + +* Include `furniture` field in `DoclingDocument`. +* CycloneDX SBOM artifacts are now published alongside each module. + +### 0.1.5 + +* New `docling-core` module with `DoclingDocument` API mirroring the [docling-core](https://github.com/docling-project/docling-core) Python library's document representation model. + ## Docling Serve ### {{ gradle.project_version }} + +### 0.5.0 + #### Breaking Changes * **`ConvertDocumentResponse` is now an abstract class** with three concrete implementations: @@ -26,11 +44,26 @@ Docling Java {{ gradle.project_version }} includes important breaking changes, a * Target is `S3Target` or `PutTarget` * **Migration guide:** Use `getResponseType()` to determine the concrete type and cast accordingly, or use pattern matching (Java 16+) or instanceof checks to handle different response types. -### 0.4.8 +### 0.4.7 + +* Support configuring timeouts in `DoclingServeApi.Builder` via `connectTimeout(Duration)` and `requestTimeout(Duration)`. +* Fix incorrect values in `OcrEngine` enum. + +### 0.4.4 + +* Fix: path component in `baseUrl` is now correctly preserved when building API request URIs. + +### 0.4.3 * Add S3-based source and target support with enhanced extensibility. * Introduce API extension point and enhance builder usage. +### 0.4.2 + +* Migrate from `java.util.logging` to SLF4J for logging. +* Fix custom `Duration` serializers with `ChronoUnit` support. +* Fix JSON property name from `options` to `convert_options` in chunk document requests. + ### 0.4.1 * Handle validation errors returned by Docling Serve (i.e. `422` responses). diff --git a/settings.gradle.kts b/settings.gradle.kts index ee5752bd..85063137 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -4,7 +4,7 @@ plugins { } rootProject.name = "docling-java" -include("docling-core", "docling-serve-api", "docling-serve-client", "docs", "docling-testcontainers", "docling-version-tests", "test-report-aggregation") +include("docling-bom", "docling-core", "docling-serve-api", "docling-serve-client", "docs", "docling-testcontainers", "docling-version-tests", "test-report-aggregation") project(":docling-serve-api").projectDir = file("docling-serve/docling-serve-api") project(":docling-serve-client").projectDir = file("docling-serve/docling-serve-client")