Skip to content

Normalize item map parsing in RewardGui and add GitHub Actions jar build#1

Merged
iphonetips1 merged 1 commit into
masterfrom
codex/linear-mention-3pdev-212-axrewards-reward-kits-break-with
Mar 29, 2026
Merged

Normalize item map parsing in RewardGui and add GitHub Actions jar build#1
iphonetips1 merged 1 commit into
masterfrom
codex/linear-mention-3pdev-212-axrewards-reward-kits-break-with

Conversation

@iphonetips1
Copy link
Copy Markdown

Motivation

  • Fix issues when reward item definitions contain nested maps or lists (including enchantment maps) so ItemBuilder.create receives a normalized map shape.
  • Add a simple CI workflow to produce and upload the plugin jar on pushes and PRs.

Description

  • Added normalizeItemMap to RewardGui which deeply converts nested maps and list elements into a shape ItemBuilder expects, including converting single-entry maps in lists to key:value strings and converting enchantment maps to a list of key:value strings, and uses LinkedHashMap to preserve ordering.
  • Replaced the previous raw cast in the claim handling code with ItemBuilder.create(normalizeItemMap(map)).get() to avoid ClassCastException and support richer configuration forms.
  • Added a GitHub Actions workflow .github/workflows/build-jar.yml that sets up Java 21 with Maven caching, runs mvn -B -DskipTests package, and uploads target/*.jar as an artifact.

Testing

  • CI workflow Build AxRewards Jar is provided to run mvn -B -DskipTests package on ubuntu-latest and upload the produced jar; tests are explicitly skipped via -DskipTests so no unit tests were executed in CI.
  • No automated unit tests were run as part of this change.

Codex Task

@iphonetips1 iphonetips1 merged commit 6cd5652 into master Mar 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant