Repository navigation
Building
- JDK 17, JDK 21, and JDK 25. The shared core and embedded bootstrap target
Java 17. The newer-loader adapter is compiled with JDK 25 against current
loader APIs, also using
--release 17. Loader-library tests run on Java 17, 21, or 25 as appropriate. Note that Gradle itself refuses to run on a very new JDK, so if your defaultjavais newer than 21, pointJAVA_HOMEat a 21 install. - Network access on the first build. Gradle and the NeoForm tooling download Minecraft artifacts.
git clone https://github.com/Jammersmurph/PackUpdater.git
cd PackUpdater
./bootstrap/build.sh
./gradlew build
| Version | |
|---|---|
| Baseline compile target | Minecraft 1.21.1 / NeoForge 21.1.216 |
| Supported Minecraft range | 1.20.1 through 26.3 |
| Desktop regression targets | 1.20.1, 1.21, 1.21.1, 26.3 |
| Modern adapter compile dependency | FancyModLoader 12.0.16 |
| Output bytecode | Java 17, including the modern adapter and bootstrap |
| Build/test toolchains | JDK 17, JDK 21, and JDK 25 |
| Tests | JUnit 5 (Jupiter 5.10.2) |
The baseline compile target is not the complete compatibility list. There is one output jar, not one artifact per Minecraft version. See Compatibility for the support range, regression checks, and release status.
minecraft_version / neo_version select the baseline compile environment.
minecraft_version_range, neo_version_range, and loader_version_range control
the jar's declared dependencies. supported_minecraft_versions lists the supported
Minecraft releases advertised by the Modrinth publication workflow.
bootstrap/ the bootstrap's source, decompiled from the original binary
build.sh builds the jar embedded in src/main/resources/updater/
src/main/java/dev/packupdater/
PackUpdater.java the @Mod entry point, holds MODID and the logger
UpdatePlugin.java legacy ITransformationService entrypoint
UpdaterStartup.java shared updater entrypoint and duplicate-run guard
LoadingProgress.java updater-owned progress bar, using public APIs
LoaderAccess.java public APIs in the original and renamed loader namespaces
UpdaterBootstrap.java starts the updater, picks an engine, drives progress
UpdaterConfig.java key resolution and the three config enums
GuiCapability.java probes whether a forked JVM can open a window
GuiProbe.java the probe itself, run as its own process
OptionalModFilter.java rebuilds an index without disabled optional mods
InProcessInstaller.java installs a pack without forking
src/main/templates/ neoforge.mods.toml, expanded at build time
src/modern/ modern NeoForge locator and its service registration
scripts/compat-*.py local Packwiz fixture and sequential visible Prism tests
src/main/resources/
updater/packupdater-bootstrap.jar the built bootstrap
default-packupdater.properties canonical first-run and release config
examples/optional-groups.toml release-attached authoring template
./gradlew test
./gradlew check
Tests cover the window probe, optional-mod decisions, config/template consistency, the in-process installer's hash/path-safety rules, progress-bar ownership, loader API contracts, and discovery of the modern service on older loaders.
test uses FML 4. check/build also run the same suite against original-namespace
FML 47 and renamed-namespace FML 3, 9, 10, and 12 in separate JVMs. These library
checks do not establish full game support.
For visible same-launch installation tests, see the
compatibility test guide.
Two things to know if you touch them:
-
Never call
GuiProbe.main()from a test. It callsSystem.exit, which kills the Gradle test worker. Assert onGuiProbe.probe(), which does not exit. This mistake previously caused half the suite to be silently skipped while CI still reported success. -
The config reference in the wiki is generated by hand. If you add a key, update
src/main/resources/default-packupdater.propertiesand the Configuration page.
bootstrap/build.sh builds the jar that PackUpdater extracts at runtime. It downloads
commons-cli 1.4 and minimal-json 0.9.5 from Maven Central and shades them in, so the result is a
single runnable jar.
./bootstrap/build.shIt is pinned for two reasons described in How it works: --release 17 so the jar
loads on Minecraft's Java, and --date so builds are reproducible. If you change the bootstrap and
forget to commit the rebuilt jar, CI will not catch the mismatch — it only asserts the class file
version — so check git status after building.
.github/workflows/build.yml runs on pushes to main/dev, pull requests to
main, version tags, and manual dispatch:
- rebuilds the bootstrap
- builds the single mod jar and runs all loader-library test suites
- asserts the mod and embedded bootstrap target Java 17 and only one mod jar is built
- uploads the jar as an artifact
Pushing a v* tag additionally runs a release job that publishes packupdater.jar,
packupdater.pw.toml, packupdater.properties, and optional-groups.toml to the
releases page.
The override is generated from the jar actually published, so its hash can never drift, and the tag
is checked against mod_version in gradle.properties before anything is published.
- Set
mod_versioningradle.properties. - Tag and push:
git tag -a v1.2.0 -m "v1.2.0" && git push origin v1.2.0. - CI publishes all four assets.
The tag must match mod_version or the release job fails on purpose.
The latest stable release on main is also mirrored to Modrinth. Its
game_versions come from supported_minecraft_versions, not the baseline
minecraft_version. Pushing to main alone does not publish a release.
Existing .pw.toml files track releases automatically through an [update.github] block, so they
pick up a new version with packwiz update and need no edit. See the
README.