Aggregated Javadoc

Aggregated Javadoc

build-logic can build a single Javadoc tree covering all the common (platform-neutral) modules at once, themed to match the docs site. This is what produces the hosted API reference.

Generating It

One task on the root project:

bash
./gradlew aggregatedJavadoc# output: build/docs/aggregatedJavadoc/index.html

It aggregates the commonProjects from magicMatrix { } on the resolved default target, so the whole shared API sits under one dev.ua.theroer package tree with no duplicate classes. Platform adapters are intentionally excluded (they exist per Minecraft version and would introduce duplicate classes across targets), as are the annotation processor and test-kit modules.

The task uses the JDK 25 toolchain and runs with doclint disabled, so a missing @param never fails the build. It is reference documentation, not a lint gate.

Theming

The generated pages get a brand skin plus a persistent "back to docs" banner:

  • gradle/javadoc/theme.css is appended after Javadoc's default stylesheet (via --add-stylesheet), so all the base layout is preserved and only the brand colours are overridden. It mirrors the docs palette and must be kept in sync with it if the brand colours change.
  • gradle/javadoc/top.html is injected at the top of every page (via -top) as a link back to the docs site.

Packaging & Hosting

A companion task zips the tree for delivery:

bash
./gradlew aggregatedJavadocZip# output: build/docs/magicutils-javadoc.zip

The delivery pipeline keeps the docs image lightweight:

  1. CI generates the zip and uploads it to Reposilite at a stable path.
  2. The docs site's Docker build downloads and unzips it into the static public/javadoc/ directory during the build.
  3. The site serves it at /javadoc, and the API page links to it.

The docs image is bun-only and cannot run Javadoc itself, so shipping the prebuilt, themed static tree is what makes the hosted reference possible.