Skip to content

refactor(config): de-couple from Minecraft & Gson#544

Draft
MattSturgeon wants to merge 6 commits into
MinecraftFreecam:mainfrom
MattSturgeon:decouple-config
Draft

refactor(config): de-couple from Minecraft & Gson#544
MattSturgeon wants to merge 6 commits into
MinecraftFreecam:mainfrom
MattSturgeon:decouple-config

Conversation

@MattSturgeon

@MattSturgeon MattSturgeon commented Jul 16, 2026

Copy link
Copy Markdown
Member

Motivation

Refactor the config system to isolate the core domain logic from Minecraft and its Gson library.
Previously, this tight coupling hindered maintainability and made the data layer difficult to test without initializing game instances.
We can now run fast, isolated unit tests and also avoid the core architecture being locked into specific dependencies.

Overview of Changes

  • Moved the configuration engine into a standalone :config subproject, completely free of Minecraft dependencies.
  • Interfaced the serialization layer via ConfigSerializer and RawConfigNode, removing direct Gson references from the core logic.
  • Split the raw configuration data model (ModConfigDTO) from the domain adapter (ModConfigImpl).
  • Introduced Kotlin testing infrastructure to validate file generation, merging, and event orchestration in isolation.
  • Addded Build/Core CI job to the matrix, which runs unit tests via :config:check. This job can also run other non-mc project tests in the future, too.
    • Kept it separate from the :build-logic CI job for now, because that runs with --project-dir. Maybe it'd be worth combining these two jobs together, though?

@MattSturgeon
MattSturgeon force-pushed the decouple-config branch 2 times, most recently from 987e3b6 to 4b9cb09 Compare July 17, 2026 13:40
@MattSturgeon
MattSturgeon marked this pull request as ready for review July 25, 2026 00:52
@MattSturgeon
MattSturgeon marked this pull request as draft July 25, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant