Skip to content

Configurable price format + build/dependency updates - #3

Merged
md5sha256 merged 3 commits into
mainfrom
feat/configurable-price-format
Aug 6, 2026
Merged

Configurable price format + build/dependency updates#3
md5sha256 merged 3 commits into
mainfrom
feat/configurable-price-format

Conversation

@md5sha256

Copy link
Copy Markdown
Collaborator

Configurable price format

Replaces the hardcoded NumberFormat.getCurrencyInstance() in PostOfficeMenu with a price-format-pattern setting under post-settings, so the currency symbol (and grouping/decimal style) can be changed via config.

post-settings:
  post-price: 0.50
  price-format-pattern: '$#,##0.00'

It is a standard java.text.DecimalFormat pattern, so any literal text around the number is kept verbatim: #,##0.00 credits, and so on.

  • Falls back to $#,##0.00 when unset or empty, so existing configs are unaffected.
  • Uses Locale.ROOT symbols so output does not shift with the server JVM locale.
  • An invalid pattern throws at format time rather than at config load, worth tightening later if that matters.

Version bumped 1.0.1-SNAPSHOT -> 1.1.0-SNAPSHOT (new backward-compatible config option).

Build / dependency updates

Gradle wrapper 9.0 -> 9.6.1, shadow 9.3.1 -> 9.6.1, run-paper 2.3.0 -> 3.0.2.

Dependency From To
VaultAPI 1.7 1.7.1
mariadb-java-client 3.4.0 3.5.10
HikariCP 5.1.0 7.1.0
configurate-yaml / -gson 4.1.2 4.2.0
cloud-paper 2.0.0-beta.10 2.0.0
cloud-annotations 2.0.0 2.1.0
junit-bom 5.10.2 6.1.2

The mariadb and HikariCP versions in plugin.yml libraries: were updated to match. HikariCP 7.x requires Java 17+, which is fine against the Java 21 target.

paper-api is deliberately left at 1.21.8-R0.1-SNAPSHOT.

junit-vintage-engine was swapped for junit-platform-launcher: JUnit 6 needs the launcher on the test runtime classpath, and there are no JUnit 4 tests. Happy to restore vintage if you want it kept for future use.

de.themoep:inventorygui:1.6.1-SNAPSHOT was left alone; the version check could not resolve metadata for it.

Testing

./gradlew build passes, TestMariaSchema (1 test) passes, shadowJar produces the relocated jar.

🤖 Generated with Claude Code

md5sha256 and others added 3 commits August 6, 2026 14:21
Replace the hardcoded locale currency NumberFormat with a
`price-format-pattern` setting under post-settings, so the currency
symbol (and grouping/decimal style) can be changed via config.

Falls back to `$#,##0.00` when unset, so existing configs are
unaffected. Uses Locale.ROOT symbols so output does not shift with the
server JVM locale.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Wrapper 9.0 -> 9.6.1, shadow 9.3.1 -> 9.6.1, run-paper 2.3.0 -> 3.0.2.

Dependencies:
- VaultAPI 1.7 -> 1.7.1
- mariadb-java-client 3.4.0 -> 3.5.10 (also in plugin.yml libraries)
- HikariCP 5.1.0 -> 7.1.0 (also in plugin.yml libraries)
- configurate-yaml/gson 4.1.2 -> 4.2.0
- cloud-paper 2.0.0-beta.10 -> 2.0.0
- cloud-annotations 2.0.0 -> 2.1.0
- junit-bom 5.10.2 -> 6.1.2

paper-api is deliberately left at 1.21.8-R0.1-SNAPSHOT.

Swapped junit-vintage-engine for junit-platform-launcher: JUnit 6 needs
the launcher on the test runtime classpath and there are no JUnit 4
tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ce-format

# Conflicts:
#	src/main/java/io/github/md5sha256/democracypost/PostSettings.java
#	src/main/resources/settings.yml
@md5sha256
md5sha256 merged commit b3b859e into main Aug 6, 2026
2 checks passed
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