Skip to content

feat: add json.registry.package option - #7

Merged
gregory-bonaventure merged 1 commit into
mainfrom
feat/registry-package-option
Mar 14, 2026
Merged

feat: add json.registry.package option#7
gregory-bonaventure merged 1 commit into
mainfrom
feat/registry-package-option

Conversation

@gregory-bonaventure

Copy link
Copy Markdown
Contributor

Summary

  • Add json.registry.package compiler option to configure the package of the generated JsonAdapterRegistry
  • Sort adapter class names alphabetically for deterministic output
  • Falls back to first adapter's package if option is not set (backward compatible)

Motivation

When @JsonRecord classes span multiple packages (e.g. io.daftech.binance and io.daftech.exchange.model), the registry package was non-deterministic. This option allows projects to explicitly set it.

Usage

<compilerArgs>
    <arg>-Ajson.registry.package=io.daftech.exchange.model</arg>
</compilerArgs>

Allow configuring the package of the generated JsonAdapterRegistry via
the compiler arg -Ajson.registry.package=<package>. Without the option,
falls back to the first adapter's package (sorted alphabetically).

This fixes registry package inconsistencies when @JsonRecord classes
span multiple packages (e.g. io.daftech.binance vs io.daftech.exchange.model).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gregory-bonaventure
gregory-bonaventure merged commit b340650 into main Mar 14, 2026
1 check failed
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