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
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [21, 25]
java: [25]
steps:
- uses: actions/checkout@v4

Expand All @@ -25,9 +25,8 @@ jobs:
cache: maven

- name: Build & verify the sample reactor
# The framework parent defaults to --release 25; JDK 21 cannot target it,
# so the LTS leg activates the framework's -Pjava21 profile (release 21).
run: mvn -B -ntp -f samples/lumen-lending/pom.xml ${{ matrix.java == '21' && '-Pjava21' || '' }} verify
# Published framework dependencies target Java 25 bytecode.
run: mvn -B -ntp -f samples/lumen-lending/pom.xml verify

book:
name: Build the book (EN + ES)
Expand All @@ -36,11 +35,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
java-version: 25
cache: maven

- name: Install WeasyPrint system libraries
Expand All @@ -54,7 +53,7 @@ jobs:
run: |
python3 -m venv build/.venv
./build/.venv/bin/python -m pip install --upgrade pip
./build/.venv/bin/pip install "weasyprint>=60" markdown pygments pyyaml cairosvg
./build/.venv/bin/pip install -r build/requirements.txt

- name: Build the English edition
run: ./build/build-book.sh --config book.yaml
Expand All @@ -65,8 +64,10 @@ jobs:
- name: Run the book-tooling tests
run: ./build/.venv/bin/python -m pytest tests -q

- name: Verify code listings against the sample reactor
run: ./build/.venv/bin/python build/verify_code.py manuscript samples/lumen-lending
- name: Verify English and Spanish code listings against the sample reactor
run: |
./build/.venv/bin/python build/verify_code.py manuscript samples/lumen-lending
./build/.venv/bin/python build/verify_code.py manuscript-es samples/lumen-lending

- name: Guard that all four artifacts exist
run: |
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
java-version: 25
cache: maven

- name: Release gate — verify the sample reactor
# JDK 21 build → activate the framework's -Pjava21 profile (the parent
# defaults to --release 25, which JDK 21 cannot target).
run: mvn -B -ntp -f samples/lumen-lending/pom.xml -Pjava21 verify
# Published framework dependencies target Java 25 bytecode.
run: mvn -B -ntp -f samples/lumen-lending/pom.xml verify

- name: Install WeasyPrint system libraries
run: |
Expand All @@ -40,14 +39,22 @@ jobs:
run: |
python3 -m venv build/.venv
./build/.venv/bin/python -m pip install --upgrade pip
./build/.venv/bin/pip install "weasyprint>=60" markdown pygments pyyaml cairosvg
./build/.venv/bin/pip install -r build/requirements.txt

- name: Build the English edition
run: ./build/build-book.sh --config book.yaml

- name: Build the Spanish edition
run: ./build/build-book.sh --config book.es.yaml

- name: Run the book-tooling tests
run: ./build/.venv/bin/python -m pytest tests -q

- name: Verify English and Spanish code listings against the sample reactor
run: |
./build/.venv/bin/python build/verify_code.py manuscript samples/lumen-lending
./build/.venv/bin/python build/verify_code.py manuscript-es samples/lumen-lending

- name: Extract release notes from the changelog
env:
TAG_NAME: ${{ github.ref_name }}
Expand Down Expand Up @@ -78,6 +85,7 @@ jobs:
uses: softprops/action-gh-release@v2
with:
body_path: release-notes.md
draft: true
files: |
dist/firefly-java-by-example.epub
dist/firefly-java-by-example.pdf
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ section matching a `v*.*.*` tag as the GitHub Release notes.

## [Unreleased]

## [26.09.01] — 2026-09-24

### Fixed

- Wrap ordinary fenced code blocks in PDF and EPUB, matching the named listings, so long lines remain readable.
- Use JDK 25 for the companion application gates, matching the published framework dependencies.
- Install the book-tooling test dependency and pin the renderer dependencies.
- Validate both English and Spanish listings and run the tooling tests before publishing all four download formats.

The manuscript and companion application content are unchanged from the previous edition.

## [26.06.01] — 2026-06-17

### Added — first complete edition (English + Spanish)
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The book is a print-grade EPUB + PDF produced by a self-contained Python (WeasyP
```bash
# one-time
python3 -m venv build/.venv
./build/.venv/bin/pip install "weasyprint>=60" markdown pygments pyyaml cairosvg
./build/.venv/bin/pip install -r build/requirements.txt

# build (macOS — uses the DYLD shim for cairo/pango)
./build/run.sh --config book.yaml # English -> dist/firefly-java-by-example.{epub,pdf}
Expand All @@ -27,16 +27,20 @@ python3 -m venv build/.venv
./build/build-book.sh --config book.yaml
```

Verify the sample reactor and the listings:
Use JDK 25 for the companion application and verify that `mvn -version` reports that JDK. The published framework dependencies used by this sample target Java 25.

Verify the sample reactor, book tooling, and both editions’ listings:

```bash
mvn -f samples/lumen-lending/pom.xml verify
./build/.venv/bin/python -m pytest tests -q
./build/.venv/bin/python build/verify_code.py manuscript samples/lumen-lending
./build/.venv/bin/python build/verify_code.py manuscript-es samples/lumen-lending
```

## Releases

Built editions (EN + ES, EPUB + PDF) are attached to each [GitHub Release](../../releases) on a CalVer (`YY.MM.PATCH`) tag.
Built editions (EN + ES, EPUB + PDF) are attached to each [GitHub Release](../../releases) on a CalVer (`YY.MM.PATCH`) tag. The release workflow prepares a draft with all four files; publish the draft after reviewing the rendered editions.

## Scope

Expand Down
6 changes: 6 additions & 0 deletions build/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
weasyprint==70.0
markdown==3.10.3
pygments==2.21.0
pyyaml==6.0.3
cairosvg==2.9.1
pytest==9.1.1
8 changes: 5 additions & 3 deletions theme/book.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,23 @@ hr{ border:none; border-top:1px solid var(--rule); margin:1.7rem 0; }
/* inline code — warm tint, firefly-green text */
code{ background:#f3ecda; color:#2c6e22; padding:.06em .36em; border-radius:4px;
font-family:"SF Mono","JetBrains Mono",Menlo,Consolas,monospace; font-size:.85em;
word-break:break-word; }
word-break:break-all; overflow-wrap:anywhere; }

/* ============ code listings ============ */
.listing{ margin:1.2rem 0; }
.filetab{ display:inline-block; background:#f3e9d2; color:var(--bronze);
font:600 .72rem/1 "SF Mono","JetBrains Mono",Menlo,monospace;
padding:.44rem .72rem; border:1px solid var(--code-border); border-bottom:none;
border-radius:8px 8px 0 0; }
pre.code{
pre.code,.code pre{
margin:0; background:var(--code-bg); border:1px solid var(--code-border);
border-radius:0 8px 8px 8px; padding:.85rem 1rem;
font-family:"SF Mono","JetBrains Mono",Menlo,Consolas,monospace;
font-size:.78rem; line-height:1.62; color:#24292f;
white-space:pre-wrap; overflow-wrap:anywhere; word-break:normal; tab-size:4;
white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-all; tab-size:4;
}
.code pre{ border-radius:8px; margin:1.2rem 0; }
.code pre code{ font:inherit; padding:0; background:none; color:inherit; }
.filetab + pre.code{ border-top-left-radius:0; }
.lcap{ font-size:.76rem; color:var(--muted); margin-top:.45rem; font-style:italic; }

Expand Down
4 changes: 2 additions & 2 deletions theme/print.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ h1,h2,h3{ break-after:avoid; }
p{ orphans:3; widows:3; }

/* nothing may exceed the text column; code wraps instead of clipping */
img,svg,table,pre.code{ max-width:100%; }
pre.code{ white-space:pre-wrap; overflow-wrap:anywhere; }
img,svg,table,pre.code,.code pre{ max-width:100%; }
pre.code,.code pre{ white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-all; }

/* ============ Contents page (print) ============ */
/* start on its own page; suppress the running head (no chtitle here) */
Expand Down
Loading