This directory contains small, buildable sample projects for the supported platforms.
When these samples are built from this repository, Gradle uses includeBuild
and dependency substitution so the samples compile against the local ConfigLib
source and the sibling CommandLib source. When copied outside the repository,
they resolve com.github.Maru32768.ConfigLib:*:latest.release and
com.github.Maru32768.CommandLib:*:latest.release from the configured
repositories.
Expected local checkout layout:
IdeaProjects/
CommandLib/
ConfigLib/
Each platform sample registers generated ConfigLib commands under /test config.
| Area | Demonstrates |
|---|---|
| Value API | Typed Value fields with bounds, descriptions, platform values, maps, sets. |
| POJO API | Plain fields with @Description, @Range, @ConfigNullable, @Masked. |
| YAML output | Default YAML file generation and description comments. |
| Generated commands | list, reload, reset, per-field get/set, history, undo, diff, and audit. |
| Multiple configs | Forge registers common, server, and client configs when available. |
| Shaded plugin/mod packaging | Shadow relocation for ConfigLib, CommandLib, Gson, and SnakeYAML Engine. |
Build a sample from its platform directory:
cd samples/spigot
./gradlew buildcd samples/paper
./gradlew buildcd samples/forge
./gradlew buildThe sample code is intentionally small and meant to show public API usage rather than complete plugin or mod behavior. Behavioral coverage belongs in the test modules.