roots = List.of(
- PROJECT_ROOT.resolve("src/main/java"),
- PROJECT_ROOT.resolve("src/test/java"),
+ PROJECT_ROOT.resolve("core/src/main/java"),
+ PROJECT_ROOT.resolve("core/src/test/java"),
PROJECT_ROOT.resolve("examples/src/main/java"),
PROJECT_ROOT.resolve("README.md"),
PROJECT_ROOT.resolve("CONTRIBUTING.md"),
diff --git a/src/test/java/com/demcha/documentation/PdfBackendIsolationGuardTest.java b/core/src/test/java/com/demcha/documentation/PdfBackendIsolationGuardTest.java
similarity index 100%
rename from src/test/java/com/demcha/documentation/PdfBackendIsolationGuardTest.java
rename to core/src/test/java/com/demcha/documentation/PdfBackendIsolationGuardTest.java
diff --git a/src/test/java/com/demcha/documentation/PublicApiNoEngineLeakTest.java b/core/src/test/java/com/demcha/documentation/PublicApiNoEngineLeakTest.java
similarity index 100%
rename from src/test/java/com/demcha/documentation/PublicApiNoEngineLeakTest.java
rename to core/src/test/java/com/demcha/documentation/PublicApiNoEngineLeakTest.java
diff --git a/src/test/java/com/demcha/documentation/PublicApiSinceTagCoverageTest.java b/core/src/test/java/com/demcha/documentation/PublicApiSinceTagCoverageTest.java
similarity index 100%
rename from src/test/java/com/demcha/documentation/PublicApiSinceTagCoverageTest.java
rename to core/src/test/java/com/demcha/documentation/PublicApiSinceTagCoverageTest.java
diff --git a/core/src/test/java/com/demcha/documentation/RepoRoot.java b/core/src/test/java/com/demcha/documentation/RepoRoot.java
new file mode 100644
index 000000000..3f4b18ff7
--- /dev/null
+++ b/core/src/test/java/com/demcha/documentation/RepoRoot.java
@@ -0,0 +1,31 @@
+package com.demcha.documentation;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+/**
+ * Resolves the repository root for the documentation / architecture guards, which
+ * read repo-root and sibling-module files (README, CONTRIBUTING, docs, the other
+ * modules' poms). The engine module lives in {@code core/}, so its basedir is no
+ * longer the repository root; these guards walk up to the root instead of assuming
+ * the working directory is it.
+ *
+ * The root is located by the Maven wrapper ({@code mvnw}), a marker unique to
+ * the repository root and stable across the module layout. Core-module-local files
+ * are resolved under {@code core/} from the returned root.
+ */
+final class RepoRoot {
+
+ private RepoRoot() {
+ }
+
+ /** The absolute repository-root path (the directory that holds {@code mvnw}). */
+ static Path get() {
+ for (Path dir = Path.of("").toAbsolutePath().normalize(); dir != null; dir = dir.getParent()) {
+ if (Files.exists(dir.resolve("mvnw"))) {
+ return dir;
+ }
+ }
+ return Path.of("").toAbsolutePath().normalize();
+ }
+}
diff --git a/src/test/java/com/demcha/documentation/SemanticLayerNoPdfBoxDependencyTest.java b/core/src/test/java/com/demcha/documentation/SemanticLayerNoPdfBoxDependencyTest.java
similarity index 100%
rename from src/test/java/com/demcha/documentation/SemanticLayerNoPdfBoxDependencyTest.java
rename to core/src/test/java/com/demcha/documentation/SemanticLayerNoPdfBoxDependencyTest.java
diff --git a/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java b/core/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java
similarity index 95%
rename from src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java
rename to core/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java
index 388a0a07a..e031c124d 100644
--- a/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java
+++ b/core/src/test/java/com/demcha/documentation/VersionConsistencyGuardTest.java
@@ -23,10 +23,11 @@
* and to the README + showcase install snippets.
*
* This is the safety net behind the aggregator-reactor version model
- * (see {@code aggregator/pom.xml}): the library {@code pom.xml} is the single
- * version source, the aggregator bumps every module in lockstep via
- * {@code versions:set}, and the child modules inherit their version rather than
- * pinning a literal. This test fails the build the moment a bump leaves any
+ * (the root {@code pom.xml} is the reactor aggregator): the engine
+ * {@code core/pom.xml} is the single version source, the aggregator bumps every
+ * module in lockstep via {@code versions:set}, and the child modules inherit
+ * their version rather than pinning a literal. This test fails the build the
+ * moment a bump leaves any
* module — or a copy-paste install snippet — pointing at a different version,
* which is the drift class that previously let the benchmarks module run
* against the previous release.
@@ -43,14 +44,14 @@
*/
class VersionConsistencyGuardTest {
- private static final Path PROJECT_ROOT = Path.of("").toAbsolutePath().normalize();
+ private static final Path PROJECT_ROOT = RepoRoot.get();
@Test
void everyModuleResolvesToTheRootProjectVersion() throws Exception {
- String root = effectiveVersion(PROJECT_ROOT.resolve("pom.xml"));
+ String root = effectiveVersion(PROJECT_ROOT.resolve("core/pom.xml"));
- assertThat(effectiveVersion(PROJECT_ROOT.resolve("aggregator/pom.xml")))
- .describedAs("aggregator/pom.xml version must equal root pom.xml version (%s)", root)
+ assertThat(effectiveVersion(PROJECT_ROOT.resolve("pom.xml")))
+ .describedAs("the root aggregator pom.xml must equal the engine (core/pom.xml) version (%s)", root)
.isEqualTo(root);
assertThat(effectiveVersion(PROJECT_ROOT.resolve("examples/pom.xml")))
.describedAs("examples must inherit the root version (%s)", root)
@@ -95,7 +96,7 @@ 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 = pinnedVersionProperty(PROJECT_ROOT.resolve("aggregator/pom.xml"), "graphcompose.fonts.version");
+ String aggregator = pinnedVersionProperty(PROJECT_ROOT.resolve("pom.xml"), "graphcompose.fonts.version");
assertThat(pinnedVersionProperty(PROJECT_ROOT.resolve("bundle/pom.xml"), "graphcompose.fonts.version"))
.describedAs("bundle graphcompose.fonts.version must match the aggregator's (%s)", aggregator)
@@ -108,7 +109,7 @@ void bundledEmojiVersionAgreesAcrossModules() throws Exception {
// 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");
+ String aggregator = pinnedVersionProperty(PROJECT_ROOT.resolve("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)
@@ -139,9 +140,9 @@ void jacocoPluginVersionAgreesAcrossModules() throws Exception {
// module that measures coverage (engine, render-pdf, templates) plus the
// aggregator that the qa + coverage children inherit, so guard the four
// against drift.
- String core = pinnedVersionProperty(PROJECT_ROOT.resolve("pom.xml"), "jacoco.plugin.version");
+ String core = pinnedVersionProperty(PROJECT_ROOT.resolve("core/pom.xml"), "jacoco.plugin.version");
- assertThat(pinnedVersionProperty(PROJECT_ROOT.resolve("aggregator/pom.xml"), "jacoco.plugin.version"))
+ assertThat(pinnedVersionProperty(PROJECT_ROOT.resolve("pom.xml"), "jacoco.plugin.version"))
.describedAs("aggregator jacoco.plugin.version must match the engine pom's (%s)", core)
.isEqualTo(core);
assertThat(pinnedVersionProperty(PROJECT_ROOT.resolve("render-pdf/pom.xml"), "jacoco.plugin.version"))
@@ -285,7 +286,7 @@ void showcaseSiteVersionMatchesTheProjectVersion() throws Exception {
*/
private Set acceptableTargets() throws Exception {
Set targets = new LinkedHashSet<>();
- targets.add(effectiveVersion(PROJECT_ROOT.resolve("pom.xml")));
+ targets.add(effectiveVersion(PROJECT_ROOT.resolve("core/pom.xml")));
String changelog = Files.readString(PROJECT_ROOT.resolve("CHANGELOG.md"));
Matcher planned = Pattern.compile("^## v([0-9][^ \\n]*)\\s*[\\u2014\\-]\\s*Planned\\b", Pattern.MULTILINE)
.matcher(changelog);
diff --git a/src/test/java/com/demcha/testing/VisualTestOutputs.java b/core/src/test/java/com/demcha/testing/VisualTestOutputs.java
similarity index 100%
rename from src/test/java/com/demcha/testing/VisualTestOutputs.java
rename to core/src/test/java/com/demcha/testing/VisualTestOutputs.java
diff --git a/src/test/java/com/demcha/testing/visual/DemoStyles.java b/core/src/test/java/com/demcha/testing/visual/DemoStyles.java
similarity index 100%
rename from src/test/java/com/demcha/testing/visual/DemoStyles.java
rename to core/src/test/java/com/demcha/testing/visual/DemoStyles.java
diff --git a/src/test/resources/data/cover_letter.txt b/core/src/test/resources/data/cover_letter.txt
similarity index 100%
rename from src/test/resources/data/cover_letter.txt
rename to core/src/test/resources/data/cover_letter.txt
diff --git a/src/test/resources/data/original_cv.yml b/core/src/test/resources/data/original_cv.yml
similarity index 100%
rename from src/test/resources/data/original_cv.yml
rename to core/src/test/resources/data/original_cv.yml
diff --git a/src/test/resources/data/raw_cv_test.json b/core/src/test/resources/data/raw_cv_test.json
similarity index 100%
rename from src/test/resources/data/raw_cv_test.json
rename to core/src/test/resources/data/raw_cv_test.json
diff --git a/src/test/resources/logback-benchmark.xml b/core/src/test/resources/logback-benchmark.xml
similarity index 100%
rename from src/test/resources/logback-benchmark.xml
rename to core/src/test/resources/logback-benchmark.xml
diff --git a/src/test/resources/logback.xml b/core/src/test/resources/logback.xml
similarity index 100%
rename from src/test/resources/logback.xml
rename to core/src/test/resources/logback.xml
diff --git a/coverage/pom.xml b/coverage/pom.xml
index 8a5fcb03e..8b5e9c956 100644
--- a/coverage/pom.xml
+++ b/coverage/pom.xml
@@ -27,7 +27,7 @@
io.github.demchaav
graph-compose-build
2.0.0-SNAPSHOT
- ../aggregator/pom.xml
+ ../pom.xml
graph-compose-coverage
diff --git a/docs/adr/0003-api-stability-and-internal-marker.md b/docs/adr/0003-api-stability-and-internal-marker.md
index 4d2bcc032..e712a363f 100644
--- a/docs/adr/0003-api-stability-and-internal-marker.md
+++ b/docs/adr/0003-api-stability-and-internal-marker.md
@@ -36,7 +36,7 @@ public surface grows.
## Decision
Introduce
-[`com.demcha.compose.document.api.Internal`](../../src/main/java/com/demcha/compose/document/api/Internal.java) —
+[`com.demcha.compose.document.api.Internal`](../../core/src/main/java/com/demcha/compose/document/api/Internal.java) —
a `@Documented`, `@Retention(RUNTIME)` annotation with targets
`{TYPE, METHOD, FIELD, CONSTRUCTOR, PACKAGE}`.
@@ -59,7 +59,7 @@ right next to `DocumentSession`, so it is discoverable.
## Coverage
-- [`document.layout.package-info.java`](../../src/main/java/com/demcha/compose/document/layout/package-info.java)
+- [`document.layout.package-info.java`](../../core/src/main/java/com/demcha/compose/document/layout/package-info.java)
carries `@Internal` at the package level. Every type in the package
inherits the marker through `Class.getPackage()`.
- 10 `public` payload records inside `BuiltInNodeDefinitions` (the
@@ -67,12 +67,12 @@ right next to `DocumentSession`, so it is discoverable.
carry an explicit `@Internal` annotation in addition to the package
marker, so the contract survives if those records later move to
`document.layout.payloads.*` (planned in Phase E.2).
-- [`InternalAnnotationCoverageTest`](../../src/test/java/com/demcha/documentation/InternalAnnotationCoverageTest.java)
+- [`InternalAnnotationCoverageTest`](../../core/src/test/java/com/demcha/documentation/InternalAnnotationCoverageTest.java)
asserts the package marker is in place and propagates to a
representative cross-section of layout types
(`BoxConstraints`, `MeasureResult`, `NodeDefinition`,
`PlacedFragment`, `LayoutGraph`).
-- [`InternalAnnotationDocumentationTest`](../../src/test/java/com/demcha/compose/document/api/InternalAnnotationDocumentationTest.java)
+- [`InternalAnnotationDocumentationTest`](../../core/src/test/java/com/demcha/compose/document/api/InternalAnnotationDocumentationTest.java)
pins the annotation's retention, target set, `@Documented`-ness,
and the source-level Javadoc contract (the phrase
*"may change in any release without notice"* and the link to the
diff --git a/docs/adr/0011-templates-v2-architecture.md b/docs/adr/0011-templates-v2-architecture.md
index c2171d5f0..0d0e87aef 100644
--- a/docs/adr/0011-templates-v2-architecture.md
+++ b/docs/adr/0011-templates-v2-architecture.md
@@ -195,7 +195,7 @@ references. The reopen made an explicit trade-off:
`PDFRenderer`, and asserts the per-pixel diff against a
checked-in baseline PNG stays within budget 2500 mismatched
pixels at per-channel tolerance 8. Baselines live under
- `src/test/resources/visual-baselines/{cv-v2,coverletter-v2}/`.
+ `core/src/test/resources/visual-baselines/{cv-v2,coverletter-v2}/`.
Re-bless after a deliberate visual change with
`-Dgraphcompose.visual.approve=true`. The harness
(`PdfVisualRegression`) was already built but never wired into
diff --git a/docs/adr/0012-nested-list-evolution.md b/docs/adr/0012-nested-list-evolution.md
index acd480404..93bf492e5 100644
--- a/docs/adr/0012-nested-list-evolution.md
+++ b/docs/adr/0012-nested-list-evolution.md
@@ -176,4 +176,4 @@ across mixed flat / nested entries.
- Tests:
[`qa/src/test/java/com/demcha/compose/document/dsl/ListBuilderNestedTest.java`](../../qa/src/test/java/com/demcha/compose/document/dsl/ListBuilderNestedTest.java).
- Snapshot baseline:
- `src/test/resources/layout-snapshots/document/nested_list_three_levels.json`.
+ `core/src/test/resources/layout-snapshots/document/nested_list_three_levels.json`.
diff --git a/docs/adr/0013-composed-table-cell.md b/docs/adr/0013-composed-table-cell.md
index 4258bfbb6..e9dc3ceb4 100644
--- a/docs/adr/0013-composed-table-cell.md
+++ b/docs/adr/0013-composed-table-cell.md
@@ -200,4 +200,4 @@ etc.).
- Tests:
[`qa/src/test/java/com/demcha/compose/document/table/TableCellComposedContentTest.java`](../../qa/src/test/java/com/demcha/compose/document/table/TableCellComposedContentTest.java).
- Snapshot baseline:
- `src/test/resources/layout-snapshots/document/table_cell_with_paragraph.json`.
+ `core/src/test/resources/layout-snapshots/document/table_cell_with_paragraph.json`.
diff --git a/docs/adr/0014-controlled-absolute-placement.md b/docs/adr/0014-controlled-absolute-placement.md
index 2ce96c1bb..40a5f15dd 100644
--- a/docs/adr/0014-controlled-absolute-placement.md
+++ b/docs/adr/0014-controlled-absolute-placement.md
@@ -217,6 +217,6 @@ diagram authors who want overflow can opt into
- Tests:
[`qa/src/test/java/com/demcha/compose/document/dsl/CanvasLayerBuilderTest.java`](../../qa/src/test/java/com/demcha/compose/document/dsl/CanvasLayerBuilderTest.java).
- Snapshot baseline:
- `src/test/resources/layout-snapshots/document/canvas_layer_basic.json`.
+ `core/src/test/resources/layout-snapshots/document/canvas_layer_basic.json`.
- Showcase:
[`examples/src/main/java/com/demcha/examples/features/canvas/CanvasLayerExample.java`](../../examples/src/main/java/com/demcha/examples/features/canvas/CanvasLayerExample.java).
diff --git a/docs/api-stability.md b/docs/api-stability.md
index 891cc17f5..65d207f41 100644
--- a/docs/api-stability.md
+++ b/docs/api-stability.md
@@ -30,19 +30,19 @@ matrix.
|---|---|---|---|
| **Stable** | _(default — no annotation)_ | The canonical authoring surface that user code is meant to call: `GraphCompose.document(...)`, `DocumentSession`, `DocumentDsl`, `RowBuilder` / `SectionBuilder` / `ParagraphBuilder` and friends, `DocumentInsets` / `DocumentColor` / `DocumentTextStyle`, the `BrandTheme` factories, and the layered template presets (`templates.cv.*`, `templates.coverletter.*`, `templates.invoice.*`, `templates.proposal.*`). | **Major releases only.** |
| **Supported** | _(no annotation; called out in the page's Javadoc)_ | A canonical surface that ships through a major line but won't be in the next one — its replacement is already the Stable path. Bug fixes + behaviour-preserving refactors only. *(No package holds this tier on the 2.0 line; the classic `cv.presets.*` CV surface held it through 1.x and was removed in 2.0 per [`which-template-system.md`](templates/which-template-system.md).)* | **Minor releases for behaviour-preserving refactors; removed wholesale in the next major.** |
-| **Extension SPI** | [`@Beta`](../src/main/java/com/demcha/compose/document/api/Beta.java) | Public extension points that authors are expected to **implement**, not only call: render-handler interfaces, [`NodeDefinition`](../src/main/java/com/demcha/compose/document/layout/NodeDefinition.java), custom `Theme` subtype contracts, fragment payload interfaces designed for extension. | Minor releases, with a one-minor deprecation window where possible. |
-| **Experimental** | [`@Beta`](../src/main/java/com/demcha/compose/document/api/Beta.java) _(same annotation as Extension SPI; the distinction lives in the docstring on the annotated element)_ | A brand-new public type shipping in its first minor release before its contract has stabilised. The contract is in active flux. | Any minor release, including removal. No deprecation window. |
-| **Internal** | [`@Internal`](../src/main/java/com/demcha/compose/document/api/Internal.java) (per-element or per-package) | Engine surface: everything in `com.demcha.compose.document.layout.*`, `com.demcha.compose.engine.*`, render-pipeline payload records, `LayoutCompiler`, `NodeDefinitionSupport`, the placement / measure / split contracts. Technically `public` for cross-package collaboration; not part of the contract. Canonical list lives in [ADR-0003](adr/0003-api-stability-and-internal-marker.md) § *Coverage*. | **Any release.** No deprecation window, no CHANGELOG entry required. |
+| **Extension SPI** | [`@Beta`](../core/src/main/java/com/demcha/compose/document/api/Beta.java) | Public extension points that authors are expected to **implement**, not only call: render-handler interfaces, [`NodeDefinition`](../core/src/main/java/com/demcha/compose/document/layout/NodeDefinition.java), custom `Theme` subtype contracts, fragment payload interfaces designed for extension. | Minor releases, with a one-minor deprecation window where possible. |
+| **Experimental** | [`@Beta`](../core/src/main/java/com/demcha/compose/document/api/Beta.java) _(same annotation as Extension SPI; the distinction lives in the docstring on the annotated element)_ | A brand-new public type shipping in its first minor release before its contract has stabilised. The contract is in active flux. | Any minor release, including removal. No deprecation window. |
+| **Internal** | [`@Internal`](../core/src/main/java/com/demcha/compose/document/api/Internal.java) (per-element or per-package) | Engine surface: everything in `com.demcha.compose.document.layout.*`, `com.demcha.compose.engine.*`, render-pipeline payload records, `LayoutCompiler`, `NodeDefinitionSupport`, the placement / measure / split contracts. Technically `public` for cross-package collaboration; not part of the contract. Canonical list lives in [ADR-0003](adr/0003-api-stability-and-internal-marker.md) § *Coverage*. | **Any release.** No deprecation window, no CHANGELOG entry required. |
| **Legacy** | _(no annotation; flagged in [`which-template-system.md`](templates/which-template-system.md) and in CHANGELOG `### Deprecations`)_ | Pre-rebuild surface kept only so callers from before a major rebuild keep compiling. Frozen — bug fixes only. *(No package holds this tier on the 2.0 line; `com.demcha.templates.*` and `com.demcha.compose.v2.*` held it through 1.x and were removed in 2.0 — the migration target is the canonical DSL.)* | **Removed in the next major**; no patch / minor changes other than security fixes. |
> Both marker annotations
-> ([`@Internal`](../src/main/java/com/demcha/compose/document/api/Internal.java)
-> and [`@Beta`](../src/main/java/com/demcha/compose/document/api/Beta.java))
+> ([`@Internal`](../core/src/main/java/com/demcha/compose/document/api/Internal.java)
+> and [`@Beta`](../core/src/main/java/com/demcha/compose/document/api/Beta.java))
> live in the public `document.api` package and are pinned by
-> [`InternalAnnotationCoverageTest`](../src/test/java/com/demcha/documentation/InternalAnnotationCoverageTest.java),
+> [`InternalAnnotationCoverageTest`](../core/src/test/java/com/demcha/documentation/InternalAnnotationCoverageTest.java),
> `InternalAnnotationDocumentationTest`, and `BetaAnnotationDocumentationTest`.
> The Extension SPI seam currently carrying `@Beta` is
-> [`NodeDefinition`](../src/main/java/com/demcha/compose/document/layout/NodeDefinition.java);
+> [`NodeDefinition`](../core/src/main/java/com/demcha/compose/document/layout/NodeDefinition.java);
> additional Extension SPI surfaces (render-handler interfaces,
> fragment-payload interfaces designed for extension) will gain the
> marker incrementally as their contract solidifies.
@@ -62,14 +62,14 @@ GraphCompose uses sealed interfaces in several places to keep visitor
code exhaustive. The public ones — the ones this policy actually covers —
are:
-- [`ChartSize`](../src/main/java/com/demcha/compose/document/chart/ChartSize.java) (Stable)
-- [`ChartSpec`](../src/main/java/com/demcha/compose/document/chart/ChartSpec.java) (Stable)
+- [`ChartSize`](../core/src/main/java/com/demcha/compose/document/chart/ChartSize.java) (Stable)
+- [`ChartSpec`](../core/src/main/java/com/demcha/compose/document/chart/ChartSpec.java) (Stable)
- [`CvSection`](../templates/src/main/java/com/demcha/compose/document/templates/cv/data/CvSection.java) (Stable)
-- [`DocumentLinkTarget`](../src/main/java/com/demcha/compose/document/node/DocumentLinkTarget.java) (Stable)
-- [`DocumentPaint`](../src/main/java/com/demcha/compose/document/style/DocumentPaint.java) (Stable)
-- [`DocumentPathSegment`](../src/main/java/com/demcha/compose/document/style/DocumentPathSegment.java) (Stable)
-- [`InlineRun`](../src/main/java/com/demcha/compose/document/node/InlineRun.java) (Stable)
-- [`ShapeOutline`](../src/main/java/com/demcha/compose/document/style/ShapeOutline.java) (Stable)
+- [`DocumentLinkTarget`](../core/src/main/java/com/demcha/compose/document/node/DocumentLinkTarget.java) (Stable)
+- [`DocumentPaint`](../core/src/main/java/com/demcha/compose/document/style/DocumentPaint.java) (Stable)
+- [`DocumentPathSegment`](../core/src/main/java/com/demcha/compose/document/style/DocumentPathSegment.java) (Stable)
+- [`InlineRun`](../core/src/main/java/com/demcha/compose/document/node/InlineRun.java) (Stable)
+- [`ShapeOutline`](../core/src/main/java/com/demcha/compose/document/style/ShapeOutline.java) (Stable)
Sealed types under `@Internal` packages — `ParagraphSpan` and
`PlacementContext` — are outside this policy by definition; their permit
@@ -246,8 +246,8 @@ Javadoc per element.
— the template naming history and the migration map for pre-2.0
callers; this stability policy lives one level up and covers all
packages, not just templates.
-- [`InternalAnnotationCoverageTest`](../src/test/java/com/demcha/documentation/InternalAnnotationCoverageTest.java)
- and [`InternalAnnotationDocumentationTest`](../src/test/java/com/demcha/compose/document/api/InternalAnnotationDocumentationTest.java)
+- [`InternalAnnotationCoverageTest`](../core/src/test/java/com/demcha/documentation/InternalAnnotationCoverageTest.java)
+ and [`InternalAnnotationDocumentationTest`](../core/src/test/java/com/demcha/compose/document/api/InternalAnnotationDocumentationTest.java)
— the architecture guards that fail the build if the package-level
`@Internal` marker disappears from `document.layout` or the
annotation's contract drifts from this policy.
diff --git a/docs/architecture/overview.md b/docs/architecture/overview.md
index 24813baf7..e7f9439f5 100644
--- a/docs/architecture/overview.md
+++ b/docs/architecture/overview.md
@@ -308,7 +308,7 @@ GraphCompose uses a practical three-layer regression strategy:
1. layout math unit tests for isolated calculations
2. layout snapshot tests for deterministic full-document geometry
checks (`LayoutSnapshotAssertions` plus baselines under
- `src/test/resources/layout-snapshots/`)
+ `core/src/test/resources/layout-snapshots/`)
3. PDF render tests for visual smoke coverage and artifact
inspection (`PdfVisualRegression`, `target/visual-tests/`)
diff --git a/docs/architecture/package-map.md b/docs/architecture/package-map.md
index 24c651f15..2cac1be6d 100644
--- a/docs/architecture/package-map.md
+++ b/docs/architecture/package-map.md
@@ -5,10 +5,10 @@ This document is the source of truth for production package ownership in the can
**Stability markers.** Public packages default to the **Stable** tier of the
[API stability policy](../api-stability.md). Engine packages (`com.demcha.compose.engine.*`,
`com.demcha.compose.document.layout`, render-pipeline internals) carry the
-[`@Internal`](../../src/main/java/com/demcha/compose/document/api/Internal.java)
+[`@Internal`](../../core/src/main/java/com/demcha/compose/document/api/Internal.java)
marker at the package level; individual types deliberately exposed as
Extension SPI inside an `@Internal` package carry
-[`@Beta`](../../src/main/java/com/demcha/compose/document/api/Beta.java)
+[`@Beta`](../../core/src/main/java/com/demcha/compose/document/api/Beta.java)
on the type itself (`NodeDefinition` is the current example). The
"Extension rule" column below names the extension seam where one is
intended.
diff --git a/docs/contributing/extension-guide.md b/docs/contributing/extension-guide.md
index 08e34b194..baa0d7a6a 100644
--- a/docs/contributing/extension-guide.md
+++ b/docs/contributing/extension-guide.md
@@ -60,8 +60,8 @@ The Phase B `ShapeContainerNode` is a clean example of all five steps:
| Step | Source file |
| --- | --- |
-| Record | [`ShapeContainerNode.java`](../../src/main/java/com/demcha/compose/document/node/ShapeContainerNode.java) |
-| NodeDefinition | `ShapeContainerDefinition` (inner class of [`BuiltInNodeDefinitions.java`](../../src/main/java/com/demcha/compose/document/layout/BuiltInNodeDefinitions.java)) |
+| Record | [`ShapeContainerNode.java`](../../core/src/main/java/com/demcha/compose/document/node/ShapeContainerNode.java) |
+| NodeDefinition | `ShapeContainerDefinition` (inner class of [`BuiltInNodeDefinitions.java`](../../core/src/main/java/com/demcha/compose/document/layout/BuiltInNodeDefinitions.java)) |
| Payloads | `ShapeClipBeginPayload`, `ShapeClipEndPayload` (also inner classes of `BuiltInNodeDefinitions`) |
| Registration | `BuiltInNodeDefinitions.registerDefaults(...)` line that calls `.register(new ShapeContainerDefinition())` |
| Render handlers | [`PdfShapeClipBeginRenderHandler.java`](../../render-pdf/src/main/java/com/demcha/compose/document/backend/fixed/pdf/handlers/PdfShapeClipBeginRenderHandler.java) and `PdfShapeClipEndRenderHandler.java` |
@@ -96,10 +96,10 @@ AFTER children).
The repo has two architecture-guard tests that pin two invariants for
new nodes:
-- [`PublicApiNoEngineLeakTest`](../../src/test/java/com/demcha/documentation/PublicApiNoEngineLeakTest.java)
+- [`PublicApiNoEngineLeakTest`](../../core/src/test/java/com/demcha/documentation/PublicApiNoEngineLeakTest.java)
— `com.demcha.compose.document.*` must not import
`com.demcha.compose.engine.*` types.
-- [`CanonicalSurfaceGuardTest`](../../src/test/java/com/demcha/documentation/CanonicalSurfaceGuardTest.java)
+- [`CanonicalSurfaceGuardTest`](../../core/src/test/java/com/demcha/documentation/CanonicalSurfaceGuardTest.java)
— public markdown docs and runnable examples must not reference the
retired legacy surface (the v1.0–v1.3 PDF composer entry point and
the old templates package). The forbidden token list lives at the
@@ -127,7 +127,7 @@ Test pattern:
- Unit test the builder asserts the resulting node has the expected
fields (see `ShapeContainerBuilderTest`).
-- Add a `*DemoTest` under `src/test/java/com/demcha/testing/visual/`
+- Add a `*DemoTest` under `core/src/test/java/com/demcha/testing/visual/`
that writes a PDF artefact under `target/visual-tests/...` so the
reviewer can check the rendered output by eye.
@@ -202,7 +202,7 @@ of a hidden behaviour drift.
Set-up per node:
1. Build a small fixture document under
- `src/test/resources/layout-snapshots/foo/` (or generate it from a
+ `core/src/test/resources/layout-snapshots/foo/` (or generate it from a
helper class).
2. Write a test that opens a `DocumentSession`, composes the
fixture, captures the layout graph, and runs
@@ -213,7 +213,7 @@ Set-up per node:
The
[`LayoutSnapshotAssertions`](../../testing/src/main/java/com/demcha/compose/testing/layout/LayoutSnapshotAssertions.java)
helper class wraps the diff machinery; existing snapshot tests under
-`src/test/java/com/demcha/compose/document/templates/builtins/`
+`core/src/test/java/com/demcha/compose/document/templates/builtins/`
(e.g. `BuiltInTemplateLayoutSnapshotTest`) show the call site shape.
## Reading the source by responsibility
diff --git a/docs/contributing/implementation-guide.md b/docs/contributing/implementation-guide.md
index 797f50466..e8b3a80ea 100644
--- a/docs/contributing/implementation-guide.md
+++ b/docs/contributing/implementation-guide.md
@@ -45,8 +45,8 @@ If the object should render something visible, the entity needs a renderable mar
Examples:
-- [TextComponent.java](../../src/main/java/com/demcha/compose/engine/components/renderable/TextComponent.java)
-- [BlockText.java](../../src/main/java/com/demcha/compose/engine/components/renderable/BlockText.java)
+- [TextComponent.java](../../core/src/main/java/com/demcha/compose/engine/components/renderable/TextComponent.java)
+- [BlockText.java](../../core/src/main/java/com/demcha/compose/engine/components/renderable/BlockText.java)
Those renderable components are render markers. Prefer keeping them backend-neutral and let renderer-owned handlers perform format-specific drawing.
@@ -100,7 +100,7 @@ If the engine needs to place the object, it usually needs a size signal.
The most common component is:
-- [ContentSize.java](../../src/main/java/com/demcha/compose/engine/components/geometry/ContentSize.java)
+- [ContentSize.java](../../core/src/main/java/com/demcha/compose/engine/components/geometry/ContentSize.java)
For simple fixed-size objects, set `ContentSize` directly in the builder.
@@ -180,7 +180,7 @@ Why the table uses this contract:
Relevant files:
-- [TableResolvedCell.java](../../src/main/java/com/demcha/compose/engine/components/content/table/TableResolvedCell.java)
+- [TableResolvedCell.java](../../core/src/main/java/com/demcha/compose/engine/components/content/table/TableResolvedCell.java)
Rule of thumb:
@@ -251,9 +251,9 @@ Preferred extension pattern for new backends:
Important files:
-- [Render.java](../../src/main/java/com/demcha/compose/engine/render/Render.java)
-- [RenderPassSession.java](../../src/main/java/com/demcha/compose/engine/render/RenderPassSession.java)
-- [RenderStream.java](../../src/main/java/com/demcha/compose/engine/render/RenderStream.java)
+- [Render.java](../../core/src/main/java/com/demcha/compose/engine/render/Render.java)
+- [RenderPassSession.java](../../core/src/main/java/com/demcha/compose/engine/render/RenderPassSession.java)
+- [RenderStream.java](../../core/src/main/java/com/demcha/compose/engine/render/RenderStream.java)
- [PdfFixedLayoutBackend.java](../../render-pdf/src/main/java/com/demcha/compose/document/backend/fixed/pdf/PdfFixedLayoutBackend.java)
- [PdfFragmentRenderHandler.java](../../render-pdf/src/main/java/com/demcha/compose/document/backend/fixed/pdf/PdfFragmentRenderHandler.java)
@@ -308,10 +308,10 @@ The layout side uses entity components, not builder classes directly.
Important files:
-- [LayoutTraversalContext.java](../../src/main/java/com/demcha/compose/engine/core/LayoutTraversalContext.java)
-- [ComputedPosition.java](../../src/main/java/com/demcha/compose/engine/components/layout/coordinator/ComputedPosition.java)
-- [EntityBounds.java](../../src/main/java/com/demcha/compose/engine/components/geometry/EntityBounds.java)
-- [ParentContainerUpdater.java](../../src/main/java/com/demcha/compose/engine/pagination/ParentContainerUpdater.java)
+- [LayoutTraversalContext.java](../../core/src/main/java/com/demcha/compose/engine/core/LayoutTraversalContext.java)
+- [ComputedPosition.java](../../core/src/main/java/com/demcha/compose/engine/components/layout/coordinator/ComputedPosition.java)
+- [EntityBounds.java](../../core/src/main/java/com/demcha/compose/engine/components/geometry/EntityBounds.java)
+- [ParentContainerUpdater.java](../../core/src/main/java/com/demcha/compose/engine/pagination/ParentContainerUpdater.java)
In practice:
diff --git a/docs/font-coverage.md b/docs/font-coverage.md
index e3af6eecb..a9f018476 100644
--- a/docs/font-coverage.md
+++ b/docs/font-coverage.md
@@ -75,6 +75,6 @@ instead of `●`, `-` or `–` instead of an arrow.
## See also
-- [`FontName`](../src/main/java/com/demcha/compose/font/FontName.java) — the built-in catalogue.
+- [`FontName`](../core/src/main/java/com/demcha/compose/font/FontName.java) — the built-in catalogue.
- Inline shapes: [`InlineShapesExample`](../examples/src/main/java/com/demcha/examples/features/text/InlineShapesExample.java).
- [Shapes recipe](recipes/shapes.md) · [Themes recipe](recipes/themes.md).
diff --git a/docs/operations/benchmarks.md b/docs/operations/benchmarks.md
index 20e183677..72e98ff2e 100644
--- a/docs/operations/benchmarks.md
+++ b/docs/operations/benchmarks.md
@@ -230,7 +230,7 @@ The wrappers above benchmark whatever is currently checked out. To answer "is
branch B faster or slower than branch A?" fairly on a noisy laptop, use the
dedicated A/B scripts. They **interleave** the two branches (A,B,A,B,…) so
thermal drift averages out, **repeat** each branch and compare **medians**, and
-**cool down** between runs. Each branch is rebuilt (`install -pl .`) before its
+**cool down** between runs. Each branch is rebuilt (`install -pl :graph-compose-core`) before its
runs so the benchmark measures that branch's engine, and untracked benchmark
probes are moved aside around the branch switch so they cannot break the other
branch's compile.
diff --git a/docs/operations/layout-snapshot-testing.md b/docs/operations/layout-snapshot-testing.md
index b69d2255d..518a04e09 100644
--- a/docs/operations/layout-snapshot-testing.md
+++ b/docs/operations/layout-snapshot-testing.md
@@ -152,7 +152,7 @@ First run for a brand-new snapshot:
That creates the committed baseline under:
-- `src/test/resources/layout-snapshots/features/my_feature_layout.json`
+- `core/src/test/resources/layout-snapshots/features/my_feature_layout.json`
Normal verification run after that:
@@ -162,7 +162,7 @@ Normal verification run after that:
If the test fails, compare:
-- expected baseline in `src/test/resources/layout-snapshots/...`
+- expected baseline in `core/src/test/resources/layout-snapshots/...`
- generated actual file in `target/visual-tests/layout-snapshots/.../*.actual.json`
Use snapshot tests when the thing you care about is layout stability. If you need visual confirmation too, keep `document.buildPdf()` in the same test or pair the snapshot test with a render test.
@@ -251,7 +251,7 @@ The extractor also normalizes numeric values before serialization. The current d
Committed baselines:
-- `src/test/resources/layout-snapshots/...`
+- `core/src/test/resources/layout-snapshots/...`
Mismatch artifacts generated during normal test runs:
@@ -292,7 +292,7 @@ The same property works for downstream projects that use `LayoutSnapshotAssertio
In normal mode:
-- expected JSON stays committed in `src/test/resources/layout-snapshots`
+- expected JSON stays committed in `core/src/test/resources/layout-snapshots`
- mismatches write an `.actual.json` artifact under `target/visual-tests/layout-snapshots`
- the assertion failure points to both expected and actual paths
diff --git a/docs/operations/test-your-document.md b/docs/operations/test-your-document.md
index e35a0ff4c..2f614db95 100644
--- a/docs/operations/test-your-document.md
+++ b/docs/operations/test-your-document.md
@@ -99,17 +99,17 @@ Once. Run the test in **update mode** so it writes the baseline JSON:
```bash
./mvnw test -Dgraphcompose.updateSnapshots=true \
- -Dtest=MyReportLayoutSnapshotTest -pl .
+ -Dtest=MyReportLayoutSnapshotTest -pl :graph-compose-core
```
-The baseline JSON appears under `src/test/resources/layout-snapshots/`.
+The baseline JSON appears under `core/src/test/resources/layout-snapshots/`.
Commit it alongside your test class — the baseline is part of the
test, not generated output.
### 4. Day-to-day: just run the suite
```bash
-./mvnw test -pl .
+./mvnw test -pl :graph-compose-core
```
The test now passes deterministically. Any change that drifts the
@@ -123,7 +123,7 @@ that you can diff against the committed baseline.
```bash
./mvnw test -Dgraphcompose.updateSnapshots=true \
- -Dtest=MyReportLayoutSnapshotTest -pl .
+ -Dtest=MyReportLayoutSnapshotTest -pl :graph-compose-core
```
The baseline is overwritten with the new layout. **Commit the updated
@@ -172,7 +172,7 @@ checks separately with regular unit tests — snapshot is for geometry.
1. The failure message points at the actual file:
`target/visual-tests/layout-snapshots/.actual.json`
2. Compare the actual against the committed baseline under
- `src/test/resources/layout-snapshots/.json`. Most diff tools
+ `core/src/test/resources/layout-snapshots/.json`. Most diff tools
highlight a single field-level change.
3. Decide what you're looking at:
- **`computedY` / `placementY` shifted by a few units** → a margin
diff --git a/docs/operations/visual-regression-testing.md b/docs/operations/visual-regression-testing.md
index 9417e943a..2792cfa35 100644
--- a/docs/operations/visual-regression-testing.md
+++ b/docs/operations/visual-regression-testing.md
@@ -61,7 +61,7 @@ class InvoiceVisualParityTest {
| Setter | Default | Meaning |
|---|---|---|
-| `baselineRoot(Path)` | `src/test/resources/visual-baselines` | where baselines and diff sidecars live |
+| `baselineRoot(Path)` | `core/src/test/resources/visual-baselines` | where baselines and diff sidecars live |
| `renderScale(float)` | `1.0` | render scale multiplier (`2.0` = retina); must be `> 0` |
| `perPixelTolerance(int)` | `6` | allowed per-channel delta (`0..255`) before a pixel counts as mismatched |
| `mismatchedPixelBudget(long)` | `0` | mismatched pixels tolerated per page before the assertion fails |
diff --git a/docs/recipes/absolute-placement.md b/docs/recipes/absolute-placement.md
index 5eb7e44d8..3149811ea 100644
--- a/docs/recipes/absolute-placement.md
+++ b/docs/recipes/absolute-placement.md
@@ -55,5 +55,5 @@ within one page.
## See also
- Runnable example: [`CanvasLayerExample`](../../examples/src/main/java/com/demcha/examples/features/canvas/CanvasLayerExample.java) — a full certificate.
-- [`CanvasLayerNode`](../../src/main/java/com/demcha/compose/document/node/CanvasLayerNode.java) — the node behind `addCanvas`.
+- [`CanvasLayerNode`](../../core/src/main/java/com/demcha/compose/document/node/CanvasLayerNode.java) — the node behind `addCanvas`.
- [Layered page design](layered-page-design.md) — canvas vs. layer stack vs. row vs. page background.
diff --git a/docs/recipes/extending.md b/docs/recipes/extending.md
index 3974078ed..4ac1ecc7b 100644
--- a/docs/recipes/extending.md
+++ b/docs/recipes/extending.md
@@ -86,7 +86,7 @@ void myNodeLaysOutAsExpected() throws Exception {
```
On first run the assertion writes
-`src/test/resources/layout-snapshots/my-feature/scenario_a.json`. To
+`core/src/test/resources/layout-snapshots/my-feature/scenario_a.json`. To
accept a baseline change after a deliberate refactor, re-run with
`-Dgraphcompose.updateSnapshots=true`. See
[`LayoutSnapshotRegressionExample`](../../examples/src/main/java/com/demcha/examples/features/snapshots/LayoutSnapshotRegressionExample.java)
diff --git a/docs/recipes/page-backgrounds.md b/docs/recipes/page-backgrounds.md
index f52d65539..67489a470 100644
--- a/docs/recipes/page-backgrounds.md
+++ b/docs/recipes/page-backgrounds.md
@@ -87,6 +87,6 @@ text.
## See also
-- [`PageBackgroundFill`](../../src/main/java/com/demcha/compose/document/api/PageBackgroundFill.java) — every factory, with ratio semantics.
+- [`PageBackgroundFill`](../../core/src/main/java/com/demcha/compose/document/api/PageBackgroundFill.java) — every factory, with ratio semantics.
- `DocumentSession.pageBackground(...)` / `pageBackgrounds(...)`.
- [Layered page design](layered-page-design.md) — choosing between page backgrounds, rows, layer stacks, and canvases.
diff --git a/docs/recipes/shape-as-container.md b/docs/recipes/shape-as-container.md
index 2c0d5cb8f..cf19e1c55 100644
--- a/docs/recipes/shape-as-container.md
+++ b/docs/recipes/shape-as-container.md
@@ -160,5 +160,5 @@ can rely on it across releases.
## See also
- [ADR 0001 — Shape-as-container](../adr/0001-shape-as-container.md) — design rationale.
-- [`ShapeContainerBuilder`](../../src/main/java/com/demcha/compose/document/dsl/ShapeContainerBuilder.java) — full builder surface.
-- [`ShapeOutline`](../../src/main/java/com/demcha/compose/document/style/ShapeOutline.java) — sealed value type for the supported outline kinds.
+- [`ShapeContainerBuilder`](../../core/src/main/java/com/demcha/compose/document/dsl/ShapeContainerBuilder.java) — full builder surface.
+- [`ShapeOutline`](../../core/src/main/java/com/demcha/compose/document/style/ShapeOutline.java) — sealed value type for the supported outline kinds.
diff --git a/docs/recipes/snapshot-testing.md b/docs/recipes/snapshot-testing.md
index 2973a4709..e77363950 100644
--- a/docs/recipes/snapshot-testing.md
+++ b/docs/recipes/snapshot-testing.md
@@ -28,7 +28,7 @@ void invoiceLayoutIsStable() throws Exception {
```
The slash-delimited key is a logical path: this example compares against
-`src/test/resources/layout-snapshots/templates/invoice/invoice_baseline.json`.
+`core/src/test/resources/layout-snapshots/templates/invoice/invoice_baseline.json`.
`LayoutSnapshotAssertions` ships in the `graph-compose-testing` artifact
(`io.github.demchaav:graph-compose-testing`), split out of the engine jar in
2.0. Add it at test scope alongside `graph-compose`; the import path is
@@ -71,7 +71,7 @@ compose the template with fixed sample data, assert the snapshot, and a
GraphCompose upgrade (or your own refactor) that shifts the layout fails
loudly instead of silently re-flowing a customer document.
-Baselines default to `src/test/resources/layout-snapshots`; overloads
+Baselines default to `core/src/test/resources/layout-snapshots`; overloads
take explicit roots when your project keeps them elsewhere:
```java
diff --git a/docs/recipes/tables.md b/docs/recipes/tables.md
index 264b3e356..a7a4f4d91 100644
--- a/docs/recipes/tables.md
+++ b/docs/recipes/tables.md
@@ -182,7 +182,7 @@ The Phase D feature set pins five test invariants:
## See also
-- [`TableBuilder`](../../src/main/java/com/demcha/compose/document/dsl/TableBuilder.java) — full builder API.
-- [`DocumentTableCell`](../../src/main/java/com/demcha/compose/document/table/DocumentTableCell.java) — cell payload with `colSpan` / `rowSpan` mutators.
-- [`DocumentTableStyle`](../../src/main/java/com/demcha/compose/document/table/DocumentTableStyle.java) — style overrides for fill, stroke, text style, padding.
+- [`TableBuilder`](../../core/src/main/java/com/demcha/compose/document/dsl/TableBuilder.java) — full builder API.
+- [`DocumentTableCell`](../../core/src/main/java/com/demcha/compose/document/table/DocumentTableCell.java) — cell payload with `colSpan` / `rowSpan` mutators.
+- [`DocumentTableStyle`](../../core/src/main/java/com/demcha/compose/document/table/DocumentTableStyle.java) — style overrides for fill, stroke, text style, padding.
- Runnable example: `examples/src/main/java/com/demcha/examples/features/tables/TableAdvancedExample.java`.
diff --git a/docs/recipes/transforms.md b/docs/recipes/transforms.md
index 7737457d4..63e14b742 100644
--- a/docs/recipes/transforms.md
+++ b/docs/recipes/transforms.md
@@ -128,8 +128,8 @@ The transform and z-index features pin three test invariants:
## See also
-- [`DocumentTransform`](../../src/main/java/com/demcha/compose/document/style/DocumentTransform.java) — value type with `none()` / `rotate()` / `scale()` factories.
-- [`Transformable`](../../src/main/java/com/demcha/compose/document/dsl/Transformable.java) — mixin interface, default rotate/scale shortcuts.
-- [`LayerStackNode.Layer`](../../src/main/java/com/demcha/compose/document/node/LayerStackNode.java) — `zIndex` field plus back-compat constructors.
+- [`DocumentTransform`](../../core/src/main/java/com/demcha/compose/document/style/DocumentTransform.java) — value type with `none()` / `rotate()` / `scale()` factories.
+- [`Transformable`](../../core/src/main/java/com/demcha/compose/document/dsl/Transformable.java) — mixin interface, default rotate/scale shortcuts.
+- [`LayerStackNode.Layer`](../../core/src/main/java/com/demcha/compose/document/node/LayerStackNode.java) — `zIndex` field plus back-compat constructors.
- [Shape-as-container recipe](shape-as-container.md) — base shape composition before adding transforms.
- Runnable example: `examples/src/main/java/com/demcha/examples/TransformsExample.java`.
diff --git a/docs/roadmaps/migration-v1-5-to-v1-6.md b/docs/roadmaps/migration-v1-5-to-v1-6.md
index b3a6d2689..99e1966cc 100644
--- a/docs/roadmaps/migration-v1-5-to-v1-6.md
+++ b/docs/roadmaps/migration-v1-5-to-v1-6.md
@@ -74,7 +74,7 @@ The `com.demcha.compose.document.layout` package — including
`LayoutGraph`, `PlacedFragment`, `PlacedNode`, `BoxConstraints`,
`MeasureResult`, `NodeDefinition`, `PreparedNode`, and ~15 other
records — is now annotated
-[`@Internal`](../../src/main/java/com/demcha/compose/document/api/Internal.java)
+[`@Internal`](../../core/src/main/java/com/demcha/compose/document/api/Internal.java)
at the package level.
The annotation is a documentation signal, not a visibility change. Code
diff --git a/docs/templates/v1-classic/README.md b/docs/templates/v1-classic/README.md
index 39f7d0066..3a900e605 100644
--- a/docs/templates/v1-classic/README.md
+++ b/docs/templates/v1-classic/README.md
@@ -128,8 +128,8 @@ copy-and-tweak entry point for callers extending their own branding.
## Visual parity & regression coverage
-- **28 layout-snapshot baselines** under `src/test/resources/layout-snapshots/canonical-templates/{cv-v2,coverletter-v2}/` lock the rendered tree of every preset.
-- **29 pixel-diff baselines** under `src/test/resources/visual-baselines/{cv-v2,coverletter-v2}/` enforce per-channel rendering parity against the v1 reference renders. The gate runs on every CI build with a calibrated `mismatchedPixelBudget` for cross-platform PDFBox font drift.
+- **28 layout-snapshot baselines** under `core/src/test/resources/layout-snapshots/canonical-templates/{cv-v2,coverletter-v2}/` lock the rendered tree of every preset.
+- **29 pixel-diff baselines** under `core/src/test/resources/visual-baselines/{cv-v2,coverletter-v2}/` enforce per-channel rendering parity against the v1 reference renders. The gate runs on every CI build with a calibrated `mismatchedPixelBudget` for cross-platform PDFBox font drift.
- Re-bless after a deliberate visual change with `-Dgraphcompose.visual.approve=true`.
---
diff --git a/docs/templates/v1-classic/authoring.md b/docs/templates/v1-classic/authoring.md
index 1d458e2a8..4dbb95c2f 100644
--- a/docs/templates/v1-classic/authoring.md
+++ b/docs/templates/v1-classic/authoring.md
@@ -408,7 +408,7 @@ class StatusReportTemplateV1Test {
```
Pin one snapshot per supported theme. The first run writes the JSON
-under `src/test/resources/layout-snapshots/...`; re-run with
+under `core/src/test/resources/layout-snapshots/...`; re-run with
`-Dgraphcompose.updateSnapshots=true` to accept a deliberate change.
PDFs land under `target/visual-tests//.pdf`. They
diff --git a/docs/templates/v2-layered/authoring-presets.md b/docs/templates/v2-layered/authoring-presets.md
index 1d2e234f1..1b75403d9 100644
--- a/docs/templates/v2-layered/authoring-presets.md
+++ b/docs/templates/v2-layered/authoring-presets.md
@@ -383,7 +383,7 @@ When you do add a new widget:
A new preset needs at least:
-1. **Smoke test** in `src/test/.../cv/presets/MyPresetSmokeTest.java`:
+1. **Smoke test** in `core/src/test/.../cv/presets/MyPresetSmokeTest.java`:
- `exposes_stable_identity` — checks `id()` and `displayName()`
- `default_factory_renders` — calls `create().compose(...)` with
a full sample document, asserts `session.roots()` is non-empty
diff --git a/docs/templates/v2-layered/contributor-guide.md b/docs/templates/v2-layered/contributor-guide.md
index ee4c662ef..aab4da0fa 100644
--- a/docs/templates/v2-layered/contributor-guide.md
+++ b/docs/templates/v2-layered/contributor-guide.md
@@ -301,7 +301,7 @@ git commit -m "test: refresh visual baselines after "
```
**Where baselines live:**
-`src/test/resources/visual-baselines/-v2-layered/-page-N.png`
+`core/src/test/resources/visual-baselines/-v2-layered/-page-N.png`
One PNG per page per preset. Pages overflow naturally — a 2-page
preset gets `-page-0.png` and `-page-1.png`.
@@ -331,7 +331,7 @@ baseline so a reviewer can see exactly what changed before deciding
to re-bless or fix.
**Reference**: see
-`src/test/java/com/demcha/compose/document/templates/cv/presets/CvV2VisualParityTest.java`
+`core/src/test/java/com/demcha/compose/document/templates/cv/presets/CvV2VisualParityTest.java`
— a 200-line drop-in template you can copy for a new family.
---
diff --git a/examples/pom.xml b/examples/pom.xml
index 5bc68cd42..b9c7c1dbc 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -8,7 +8,7 @@
io.github.demchaav
graph-compose-build
2.0.0-SNAPSHOT
- ../aggregator/pom.xml
+ ../pom.xml
graph-compose-examples
diff --git a/jitpack.yml b/jitpack.yml
index c0859639d..e49118c38 100644
--- a/jitpack.yml
+++ b/jitpack.yml
@@ -12,4 +12,4 @@
jdk:
- openjdk17
install:
- - ./mvnw -DskipTests -f aggregator/pom.xml install -pl :graph-compose-core,:graph-compose
+ - ./mvnw -DskipTests install -pl :graph-compose-core,:graph-compose
diff --git a/pom.xml b/pom.xml
index 2746963bc..274107bdf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,738 +5,82 @@
4.0.0
io.github.demchaav
- graph-compose-core
+ graph-compose-build
2.0.0-SNAPSHOT
-
- GraphCompose Core
- A declarative layout engine for programmatic document generation, implemented primarily in Java. This is the lean engine coordinate; depend on the `graph-compose` artifact for the drop-in, PDF-capable install.
- https://github.com/DemchaAV/GraphCompose
-
-
-
- MIT License
- https://opensource.org/licenses/MIT
- repo
-
-
-
-
-
- DemchaAV
- Artem Demchyshyn
- demchishynartem@gmail.com
- https://github.com/DemchaAV
-
- Lead Developer
- Architect
-
- UTC 0
-
-
-
-
- scm:git:https://github.com/DemchaAV/GraphCompose.git
- scm:git:ssh://git@github.com/DemchaAV/GraphCompose.git
- https://github.com/DemchaAV/GraphCompose/tree/main
-
-
+ pom
+
+ GraphCompose Build Aggregator
+
+ Non-published reactor aggregator at the repository root. Builds the
+ library plus the examples and benchmarks modules in one pass and gives a
+ single entry point for `versions:set`, so a version bump propagates to
+ every module at once. This is NOT a Maven parent and is NOT published to
+ JitPack: the engine lives in the standalone core/pom.xml
+ (graph-compose-core) so consumer coordinates never change.
+
+ Usage:
+ mvn -DskipTests install # build everything
+ mvn versions:set -DnewVersion=X # bump all modules
+
+
+
-
- UTF-8
- 17
-
-
- 0.64.8
- 1.5.37
- 1.18.46
- 2.0.18
-
-
- 3.27.7
- 6.1.1
- 5.23.0
- 1.18.11
- 1.4.2
- 1.9.3
-
-
- 1.0.0
- 1.0.0
-
-
- 0.11.0
- 3.15.0
- 3.6.3
- 3.2.8
- 3.5.0
- 3.12.0
- 3.4.0
- 3.5.6
- 0.8.12
-
-
-
-
-
- 3.8.0
- 17
-
-
- 0.26.1
- v1.7.0
-
-
- true
-
-
-
-
-
- org.junit
- junit-bom
- ${junit.bom.version}
- pom
- import
-
-
-
-
-
-
-
- org.projectlombok
- lombok
- ${lombok.version}
- provided
-
-
-
- org.slf4j
- slf4j-api
- ${slf4j.version}
-
-
-
-
- com.vladsch.flexmark
- flexmark
- ${flexmark.version}
-
-
- com.vladsch.flexmark
- flexmark-util-ast
- ${flexmark.version}
-
-
- com.vladsch.flexmark
- flexmark-util-data
- ${flexmark.version}
-
-
-
+ true
-
- io.github.demchaav
- graph-compose-fonts
- ${graphcompose.fonts.version}
- test
-
-
- io.github.demchaav
- graph-compose-emoji
- ${graphcompose.emoji.version}
- test
-
-
-
- ch.qos.logback
- logback-classic
- ${logback.version}
- test
-
-
-
- org.junit.jupiter
- junit-jupiter
- test
-
-
- org.assertj
- assertj-core
- ${assertj.version}
- test
-
-
- org.mockito
- mockito-core
- ${mockito.version}
- test
-
-
- net.bytebuddy
- byte-buddy
-
-
-
-
- net.bytebuddy
- byte-buddy
- ${byteBuddy.version}
- test
-
-
- org.mockito
- mockito-junit-jupiter
- ${mockito.version}
- test
-
-
-
-
- com.tngtech.archunit
- archunit
- ${archunit.version}
- test
-
-
-
-
- net.jqwik
- jqwik
- ${jqwik.version}
- test
-
-
-
-
-
-
-
-
-
- src/test/resources
-
-
-
+ 1.0.0
-
-
-
- org.apache.maven.plugins
- maven-clean-plugin
- 3.5.0
-
-
- org.apache.maven.plugins
- maven-install-plugin
- 3.1.4
-
-
- org.apache.maven.plugins
- maven-site-plugin
- 3.22.0
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- 3.5.0
-
-
- org.apache.maven.plugins
- maven-deploy-plugin
- 3.1.4
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
- ${maven.enforcer.plugin.version}
-
-
- enforce-toolchain-and-plugin-versions
- validate
-
- enforce
-
-
-
-
- [${enforcer.requireMavenVersion},)
- GraphCompose requires Maven ${enforcer.requireMavenVersion} or newer.
-
-
- [${enforcer.requireJavaVersion},)
- GraphCompose requires JDK ${enforcer.requireJavaVersion} or newer.
-
-
- true
- true
- true
- Every plugin must declare an explicit non-LATEST/RELEASE version. See PR-7.1 (exec-plugin drift) for the lesson.
-
-
- true
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- ${maven.compiler.plugin.version}
-
- ${maven.compiler.release}
-
-
- org.projectlombok
- lombok
- ${lombok.version}
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- ${maven.surefire.plugin.version}
-
-
- @{argLine} -javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockito.version}/mockito-core-${mockito.version}.jar
-
-
-
-
-
- org.jacoco
- jacoco-maven-plugin
- ${jacoco.plugin.version}
-
-
- jacoco-prepare-agent
-
- prepare-agent
-
-
-
- jacoco-report
- test
-
- report
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- ${maven.jar.plugin.version}
-
-
- attach-test-jar
-
- test-jar
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- ${maven.javadoc.plugin.version}
-
- all
- true
- public
- true
- com.demcha.compose.document
-
-
-
-
-
-
+ 1.0.0
-
- release
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- ${maven.jar.plugin.version}
-
-
- attach-test-jar
- none
-
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- ${maven.source.plugin.version}
-
-
- attach-sources
- package
-
- jar-no-fork
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- ${maven.javadoc.plugin.version}
-
-
- attach-javadocs
- package
-
- jar
-
-
-
- none
- false
- true
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-gpg-plugin
- ${maven.gpg.plugin.version}
-
-
- sign-artifacts
- verify
-
- sign
-
-
- ${gpg.skip}
-
- --pinentry-mode
- loopback
-
-
-
-
-
-
-
- org.sonatype.central
- central-publishing-maven-plugin
- ${central.publishing.plugin.version}
- true
-
- central
- false
- validated
-
-
-
-
-
+ 0.8.12
+
+
+
+ core
+ render-pdf
+ wrapper
+ fonts
+ emoji
+ render-docx
+ render-pptx
+ templates
+ testing
+ bundle
+ examples
+ benchmarks
+ qa
-
- japicmp
-
-
- jitpack.io
- https://jitpack.io
-
-
-
-
-
- com.github.siom79.japicmp
- japicmp-maven-plugin
- ${japicmp.version}
-
-
- japicmp-against-baseline
- verify
-
- cmp
-
-
-
-
-
-
- com.github.DemchaAV
- GraphCompose
- ${japicmp.baseline}
-
-
-
-
- ${project.build.directory}/${project.build.finalName}.jar
-
-
-
- true
-
- false
- false
- false
- true
- true
-
-
- com.demcha.compose.document.layout.payloads
-
- com.demcha.compose.engine.measurement.TextMeasurementSystem
-
- com.demcha.compose.ConfigLoader
-
-
-
-
-
-
-
-
+ coverage
+