From 685118066aac816197256883f6f91ec3c096ff5e Mon Sep 17 00:00:00 2001 From: DemchaAV Date: Mon, 6 Jul 2026 00:41:07 +0100 Subject: [PATCH] build(bundle): aggregate templates and colour emoji into graph-compose-bundle graph-compose-bundle is the batteries-included coordinate, but after the module split it only pulled the default PDF stack (the graph-compose wrapper = core + render-pdf) and the bundled fonts. Add the built-in templates (graph-compose-templates) and the colour-emoji set (graph-compose-emoji) so one dependency wires up everything a document commonly needs. The office backends (render-docx / render-pptx) stay opt-in and are not bundled. The emoji artifact carries its own version line, so pin it via a graphcompose.emoji.version property (mirroring the fonts pin) and guard the aggregator and bundle values against drift with bundledEmojiVersionAgreesAcrossModules. Refresh the bundle's Maven description, the README bundle and emoji notes, and the emoji release runbook to match the new contents. --- CHANGELOG.md | 6 +++ README.md | 10 ++-- bundle/pom.xml | 49 +++++++++++++------ docs/contributing/release-process.md | 15 +++--- .../VersionConsistencyGuardTest.java | 23 +++++++-- 5 files changed, 73 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1af1da816..0649161df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,12 @@ for this cycle. `com.demcha.compose.testing.layout` / `com.demcha.compose.testing.visual` packages are unchanged, so imports stay the same; add `graph-compose-testing` at test scope to keep using them. +- `graph-compose-bundle` is the batteries-included aggregate for the split layout: + one dependency pulls the default PDF stack (`graph-compose` = core + render-pdf), + the built-in templates (`graph-compose-templates`), the bundled Google fonts, and + the colour-emoji set at compatible pinned versions. The office backends + (`graph-compose-render-docx` / `graph-compose-render-pptx`) stay opt-in and are not + bundled. ## v1.9.0 — 2026-06-29 diff --git a/README.md b/README.md index 533ec3208..91ebc7c3b 100644 --- a/README.md +++ b/README.md @@ -97,8 +97,9 @@ dependencies { implementation("io.github.demchaav:graph-compose:2.0.0") } > > Prefer a single "batteries-included" coordinate? Depend on > `io.github.demchaav:graph-compose-bundle` (same version as `graph-compose` -> above) to pull the engine + fonts together. Full details and upgrade steps: -> the [v1.8.0 fonts migration note](./docs/migration/v1.8.0-fonts.md). +> above) to pull the default PDF engine, the built-in templates, the fonts, and +> the colour emoji together. Full details and upgrade steps: the +> [v1.8.0 fonts migration note](./docs/migration/v1.8.0-fonts.md). > **Colour emoji (from v1.9.0).** `RichText.emoji(":star:", size)` resolves > GitHub-style shortcodes to inline vector glyphs from an independently-versioned @@ -114,8 +115,9 @@ dependencies { implementation("io.github.demchaav:graph-compose:2.0.0") } > ``` > > An unknown shortcode falls back to its literal text, so a document that uses no -> emoji — or runs without the artifact — renders unchanged. The -> `graph-compose-bundle` stays fonts-only; emoji is opt-in. +> emoji — or runs without the artifact — renders unchanged. Depending +> on `graph-compose` directly keeps emoji opt-in; the batteries-included +> `graph-compose-bundle` includes it. > **Distribution** — Maven Central is the canonical channel from **v1.6.6** onwards > (`io.github.demchaav:graph-compose:`). Hosted Javadocs auto-publish to diff --git a/bundle/pom.xml b/bundle/pom.xml index c748db239..8309f597c 100644 --- a/bundle/pom.xml +++ b/bundle/pom.xml @@ -6,30 +6,33 @@ io.github.demchaav graph-compose-bundle 2.0.0-SNAPSHOT pom GraphCompose Bundle - Batteries-included aggregate: the GraphCompose engine plus the bundled Google fonts at compatible versions. + Batteries-included aggregate: the default PDF stack (engine + PDF backend), the built-in document templates, the bundled Google fonts, and the colour-emoji set at compatible versions. https://github.com/DemchaAV/GraphCompose @@ -63,8 +66,11 @@ UTF-8 - + 1.0.0 + 1.0.0 3.2.8 0.11.0 @@ -73,18 +79,31 @@ - + io.github.demchaav graph-compose ${project.version} + + + io.github.demchaav + graph-compose-templates + ${project.version} + io.github.demchaav graph-compose-fonts ${graphcompose.fonts.version} + + + io.github.demchaav + graph-compose-emoji + ${graphcompose.emoji.version} + diff --git a/docs/contributing/release-process.md b/docs/contributing/release-process.md index fda09d533..f7beb7ddc 100644 --- a/docs/contributing/release-process.md +++ b/docs/contributing/release-process.md @@ -136,9 +136,9 @@ is a convenience aggregate `io.github.demchaav:graph-compose-bundle` (under The colour-emoji glyphs ship as a **separate, independently-versioned** artifact, `io.github.demchaav:graph-compose-emoji` (under `emoji/`), mirroring -the fonts arrangement above — with one difference: the **bundle does NOT -include emoji** (it stays opt-in), so a fonts-style consumer re-pin is not -needed. +the fonts arrangement above — including the `graph-compose-bundle`, which pins +`graph-compose-emoji` (via `${graphcompose.emoji.version}`) just as it pins the +fonts, so cutting an emoji release needs the same consumer re-pin. - **NOT bumped by the engine release.** It carries its own version line (started at `1.0.0`) and is bumped **only when the glyph set or shortcode @@ -147,9 +147,12 @@ needed. - **Cutting an emoji release** (only when the set changes): bump `emoji/pom.xml` ``, push an `emoji-vX.Y.Z` tag. That tag triggers [`publish-emoji.yml`](../../.github/workflows/publish-emoji.yml), which deploys - only `graph-compose-emoji` to Central. The engine has no dependency on the - emoji artifact (its tests read the glyphs from the sibling module's source via - ``), so nothing else needs re-pinning. + only `graph-compose-emoji` to Central. Then bump `` + in `aggregator/pom.xml` (inherited by examples) and `bundle/pom.xml` to the new + emoji version so those consumers pin it — the `bundledEmojiVersionAgreesAcrossModules` + version guard enforces that the two stay in agreement. The engine `pom.xml` does + **not** carry this property — the engine has no dependency on the emoji artifact + (its tests read the glyphs from the sibling module's source via ``). - **Regenerating the set.** `emoji/tools/build-emoji-set.py` rebuilds `emoji/svg/` + `emoji-index.properties` from fresh Noto Emoji + gemoji sources, copying **only** the glyphs a shortcode resolves (see diff --git a/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java b/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java index 7587b7b71..e988f5cf3 100644 --- a/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java +++ b/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java @@ -95,13 +95,26 @@ void bundledFontsVersionAgreesAcrossModules() throws Exception { // it: the aggregator (inherited by examples + benchmarks) and the bundle. // This guards the version-literal drift class: those must always agree, even // though they differ from the engine version line. - String aggregator = fontsVersionProperty(PROJECT_ROOT.resolve("aggregator/pom.xml")); + String aggregator = pinnedVersionProperty(PROJECT_ROOT.resolve("aggregator/pom.xml"), "graphcompose.fonts.version"); - assertThat(fontsVersionProperty(PROJECT_ROOT.resolve("bundle/pom.xml"))) + assertThat(pinnedVersionProperty(PROJECT_ROOT.resolve("bundle/pom.xml"), "graphcompose.fonts.version")) .describedAs("bundle graphcompose.fonts.version must match the aggregator's (%s)", aggregator) .isEqualTo(aggregator); } + @Test + void bundledEmojiVersionAgreesAcrossModules() throws Exception { + // graph-compose-emoji, like graph-compose-fonts, carries an independent + // version line (emoji-v* tag) and the ${graphcompose.emoji.version} property + // that pins it lives in the aggregator (inherited by examples) and the bundle + // (which now ships the colour-emoji set). Guard the same version-literal drift. + String aggregator = pinnedVersionProperty(PROJECT_ROOT.resolve("aggregator/pom.xml"), "graphcompose.emoji.version"); + + assertThat(pinnedVersionProperty(PROJECT_ROOT.resolve("bundle/pom.xml"), "graphcompose.emoji.version")) + .describedAs("bundle graphcompose.emoji.version must match the aggregator's (%s)", aggregator) + .isEqualTo(aggregator); + } + @Test void childModulesInheritVersionInsteadOfDeclaringTheirOwn() throws Exception { assertThat(declaresOwnVersion(PROJECT_ROOT.resolve("examples/pom.xml"))) @@ -288,11 +301,11 @@ private static boolean declaresOwnVersion(Path pom) throws Exception { return directChild(parse(pom).getDocumentElement(), "version") != null; } - private static String fontsVersionProperty(Path pom) throws IOException { - Matcher matcher = Pattern.compile("([^<]+)") + private static String pinnedVersionProperty(Path pom, String property) throws IOException { + Matcher matcher = Pattern.compile("<" + Pattern.quote(property) + ">([^<]+)") .matcher(Files.readString(pom)); assertThat(matcher.find()) - .describedAs("expected a property in %s", pom) + .describedAs("expected a <%s> property in %s", property, pom) .isTrue(); return matcher.group(1).trim(); }