Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
# cross-module suites (which need the testing module + the engine test-jar on
# the classpath and so cannot live in the engine's own test scope). -am pulls
# the fonts / emoji upstreams; bundle / examples / benchmarks are excluded.
run: ./mvnw -B -ntp -f aggregator/pom.xml clean verify -pl :graph-compose-core,:graph-compose-render-pdf,:graph-compose-render-docx,:graph-compose-render-pptx,:graph-compose-testing,:graph-compose-qa -am
run: ./mvnw -B -ntp -f aggregator/pom.xml clean verify -pl :graph-compose-core,:graph-compose-render-pdf,:graph-compose-render-docx,:graph-compose-render-pptx,:graph-compose-templates,:graph-compose-testing,:graph-compose-qa -am

- name: Generate Javadoc
# Run only on the baseline JDK — Javadoc output is identical
Expand Down Expand Up @@ -144,6 +144,11 @@ jobs:
# dependency) before the examples build resolves it.
run: ./mvnw -B -ntp -f testing/pom.xml -DskipTests install

- name: Install graph-compose-templates (consumed by the examples module)
# The flagship + template examples render the built-in CV/invoice/proposal
# presets, which now ship in graph-compose-templates.
run: ./mvnw -B -ntp -f templates/pom.xml -DskipTests install

- name: Compile examples module
run: ./mvnw -B -ntp -f examples/pom.xml clean compile

Expand Down Expand Up @@ -238,6 +243,9 @@ jobs:
# build resolves it.
run: ./mvnw -B -ntp -f render-pdf/pom.xml -DskipTests install

- name: Install graph-compose-templates (consumed by the benchmarks module)
run: ./mvnw -B -ntp -f templates/pom.xml -DskipTests install

- name: Compile benchmarks module
run: ./mvnw -B -ntp -f benchmarks/pom.xml clean compile

Expand Down Expand Up @@ -312,6 +320,9 @@ jobs:
# build resolves it.
run: ./mvnw -B -ntp -f render-pdf/pom.xml -DskipTests install

- name: Install graph-compose-templates (consumed by the benchmarks module)
run: ./mvnw -B -ntp -f templates/pom.xml -DskipTests install

- name: Compile benchmarks module
run: ./mvnw -B -ntp -f benchmarks/pom.xml clean compile

Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ jobs:
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Publish templates to Maven Central
# The built-in document templates, lockstep-versioned with the engine (ships
# on the same v* tag). graph-compose-core resolves from the local repo
# installed by the engine deploy above.
run: ./mvnw -B -ntp -f templates/pom.xml -P release -DskipTests -Dgpg.skip=false deploy
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Publish testing to Maven Central
# Consumer testing support (LayoutSnapshotAssertions / PdfVisualRegression),
# lockstep-versioned with the engine (ships on the same v* tag). graph-compose
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ for this cycle.
`graph-compose-render-pdf`**, which the `graph-compose` wrapper aggregates so a
bare `graph-compose` still renders PDF, while `graph-compose-core` alone is lean
(it throws `MissingBackendException` if asked to render without a backend). The
built-in templates move into their own module over the rest of the 2.0 cycle. The
**built-in templates now ship in `graph-compose-templates`** (opt-in; the
`graph-compose` wrapper does not bundle them). The
optional `graph-compose-fonts` / `graph-compose-emoji` artifacts are unchanged.
Full install guidance ships with 2.0.0.
- `graph-compose-render-pdf` is a separate artifact: the entire PDFBox backend —
Expand All @@ -51,6 +52,12 @@ for this cycle.
PDF provider ships in render-pdf and is discovered at runtime. Depend on
`graph-compose` (or `graph-compose-render-pdf` directly) for PDF; a bare
`graph-compose-core` renders nothing until a backend is on the classpath.
- `graph-compose-templates` is a separate artifact: the built-in CV, cover-letter,
invoice, and proposal templates (`document.templates.**`) leave the engine. They
are pure authoring code over the canonical DSL, so the module depends only on
`graph-compose-core`. Add `graph-compose-templates` for the ready-made presets; a
consumer that used them through `graph-compose` before must now add this artifact
(the `com.demcha.compose.document.templates.**` packages are unchanged).
- The semantic office backends are separate artifacts and Apache POI leaves the
engine: `DocxSemanticBackend` ships in `graph-compose-render-docx` (which brings
POI transitively — add it to export DOCX), and `PptxSemanticBackend` ships in its
Expand Down
1 change: 1 addition & 0 deletions aggregator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<module>../emoji</module>
<module>../render-docx</module>
<module>../render-pptx</module>
<module>../templates</module>
<module>../testing</module>
<module>../bundle</module>
<module>../examples</module>
Expand Down
28 changes: 14 additions & 14 deletions benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@
<artifactId>graph-compose-render-pdf</artifactId>
<version>${graphcompose.version}</version>
</dependency>
<!-- The built-in templates (benchmarked alongside the raw engine) and their
tests-classifier jar for the template data fixtures. -->
<dependency>
<groupId>io.github.demchaav</groupId>
<artifactId>graph-compose-templates</artifactId>
<version>${graphcompose.version}</version>
</dependency>
<dependency>
<groupId>io.github.demchaav</groupId>
<artifactId>graph-compose-templates</artifactId>
<version>${graphcompose.version}</version>
<type>test-jar</type>
<classifier>tests</classifier>
</dependency>

<!--
Bundled Google fonts, split out of the engine jar in v1.8.0. The
Expand All @@ -73,20 +87,6 @@
<version>${graphcompose.fonts.version}</version>
</dependency>

<!--
graph-compose's test-only fixtures (com.demcha.mock.*) used by
CanonicalBenchmarkSupport for CV / invoice / proposal sample
data. Pulled in via the tests-classifier jar published by
the main module's maven-jar-plugin test-jar execution.
-->
<dependency>
<groupId>io.github.demchaav</groupId>
<artifactId>graph-compose-core</artifactId>
<version>${graphcompose.version}</version>
<type>test-jar</type>
<classifier>tests</classifier>
</dependency>

<!-- Logging for benchmark runs. -->
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
8 changes: 8 additions & 0 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@
<version>${graphcompose.version}</version>
</dependency>

<!-- The built-in CV / cover-letter / invoice / proposal templates that the
flagship + template examples render. -->
<dependency>
<groupId>io.github.demchaav</groupId>
<artifactId>graph-compose-templates</artifactId>
<version>${graphcompose.version}</version>
</dependency>

<!-- Snapshot-regression demo (LayoutSnapshotRegressionExample) uses
LayoutSnapshotJson, which ships in graph-compose-testing since 2.0.
It also brings jackson-databind transitively, which EngineDeckData
Expand Down
17 changes: 17 additions & 0 deletions qa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<!-- The built-in templates (the relocated visual-parity + smoke suites
render them) plus their tests-classifier jar, which carries the template
data fixtures (com.demcha.mock.*DataFixtures). -->
<dependency>
<groupId>io.github.demchaav</groupId>
<artifactId>graph-compose-templates</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.demchaav</groupId>
<artifactId>graph-compose-templates</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.demchaav</groupId>
<artifactId>graph-compose-fonts</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package com.demcha.documentation;
import com.demcha.compose.qa.RepoPaths;

import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -72,7 +73,7 @@
*/
class DocumentationSnippetCompileTest {

private static final Path PROJECT_ROOT = Path.of("").toAbsolutePath().normalize();
private static final Path PROJECT_ROOT = RepoPaths.repoRoot();
private static final Path DOCS_ROOT = PROJECT_ROOT.resolve("docs");

private static final Pattern MARKER =
Expand Down
6 changes: 5 additions & 1 deletion scripts/cut-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ function Run-ShowcaseSync {
$execProp = '"-Dexec.mainClass=com.demcha.examples.support.ShowcaseSync"'
# The examples module depends on these bumped SNAPSHOT siblings (not on
# Central); each must be installed before exec:java can resolve them.
$exampleSnapshotSiblings = @('render-pdf/pom.xml', 'wrapper/pom.xml', 'render-docx/pom.xml', 'testing/pom.xml')
$exampleSnapshotSiblings = @('render-pdf/pom.xml', 'wrapper/pom.xml', 'render-docx/pom.xml', 'templates/pom.xml', 'testing/pom.xml')
if ($DryRun) {
Write-Host " [DRY RUN] $mvnw -B -ntp -DskipTests install -pl ." -ForegroundColor Yellow
foreach ($modulePom in $exampleSnapshotSiblings) {
Expand Down Expand Up @@ -502,6 +502,9 @@ try {
Update-PomVersion (Join-Path $repoRoot 'render-pdf/pom.xml') $Version
Update-PomVersion (Join-Path $repoRoot 'render-docx/pom.xml') $Version
Update-PomVersion (Join-Path $repoRoot 'render-pptx/pom.xml') $Version
# graph-compose-templates tracks the engine line (lockstep): its <version> bumps
# here and its graph-compose-core dep is ${project.version} (follows automatically).
Update-PomVersion (Join-Path $repoRoot 'templates/pom.xml') $Version
# graph-compose-testing tracks the engine line (lockstep): its <version>
# bumps here and its graph-compose dep is ${project.version} (follows
# automatically). graph-compose-qa is an aggregator child (its version is
Expand Down Expand Up @@ -581,6 +584,7 @@ try {
'render-pdf/pom.xml',
'render-docx/pom.xml',
'render-pptx/pom.xml',
'templates/pom.xml',
'testing/pom.xml',
'wrapper/pom.xml',
'examples/pom.xml',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* <p>Types in this package and in {@link com.demcha.compose.document.dsl},
* {@link com.demcha.compose.document.node},
* {@link com.demcha.compose.document.style}, and
* {@link com.demcha.compose.document.templates.api} are public API and follow
* {@code com.demcha.compose.document.templates.api} are public API and follow
* deprecation discipline. Types annotated with
* {@link com.demcha.compose.document.api.Internal &#64;Internal}
* (notably the {@code document.layout} package) are implementation detail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ void everyModuleResolvesToTheRootProjectVersion() throws Exception {
assertThat(effectiveVersion(PROJECT_ROOT.resolve("render-pdf/pom.xml")))
.describedAs("render-pdf (graph-compose-render-pdf) tracks the engine line and must equal the root version (%s)", root)
.isEqualTo(root);
assertThat(effectiveVersion(PROJECT_ROOT.resolve("templates/pom.xml")))
.describedAs("templates (graph-compose-templates) tracks the engine line and must equal the root version (%s)", root)
.isEqualTo(root);
assertThat(effectiveVersion(PROJECT_ROOT.resolve("testing/pom.xml")))
.describedAs("testing (graph-compose-testing) tracks the engine line and must equal the root version (%s)", root)
.isEqualTo(root);
Expand Down
Loading