Skip to content

Update shadowJar task to relocate fastutil package - #403

Merged
twisti-dev merged 4 commits into
version/26.2from
chore/some-minestom-changes
Aug 10, 2026
Merged

Update shadowJar task to relocate fastutil package#403
twisti-dev merged 4 commits into
version/26.2from
chore/some-minestom-changes

Conversation

@twisti-dev

Copy link
Copy Markdown
Contributor

This pull request introduces improvements to dependency management and build configuration for the Minestom platform. The main changes focus on relocating the fastutil library to avoid conflicts, and enhancing compiler settings for better debugging and compatibility.

Dependency relocation:

  • Added logic to relocate the it.unimi.dsi.fastutil package to a project-specific namespace in the shadowJar task in surf-api-minestom/build.gradle.kts, preventing dependency clashes.
  • Configured the Minestom plugin to relocate it.unimi.dsi.fastutil to fastutil, ensuring runtime isolation.

Build configuration improvements:

  • Enabled javaParameters in the Kotlin compiler options within CommonSurfPlugin, which improves reflection and debugging capabilities by retaining parameter names.

- add relocation for "it.unimi.dsi.fastutil" to "$relocationPrefix.fastutil" in shadowJar task
- enable javaParameters in compilerOptions for better compatibility
@twisti-dev twisti-dev self-assigned this Aug 10, 2026
Copilot AI lite review requested due to automatic review settings August 10, 2026 18:00
🔧 chore: update version to 2.1.1 in build.gradle.kts
```
@twisti-dev
twisti-dev merged commit 22bc99a into version/26.2 Aug 10, 2026
4 of 7 checks passed
@twisti-dev
twisti-dev deleted the chore/some-minestom-changes branch August 10, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Minestom platform’s shading/relocation configuration to prevent fastutil dependency conflicts at runtime, and tweaks Kotlin compiler settings in the shared Gradle plugin to preserve Java reflection parameter names.

Changes:

  • Relocate it.unimi.dsi.fastutil in the surf-api-minestom module’s shadowJar output to the project relocation prefix.
  • Add a Minestom Gradle plugin relocation rule for fastutil (aligned with existing Velocity behavior).
  • Enable Kotlin compiler javaParameters in CommonSurfPlugin to retain parameter names for Java reflection/debugging.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
surf-api-minestom/build.gradle.kts Adds shadowJar relocation for it.unimi.dsi.fastutil to avoid runtime package conflicts.
surf-api-gradle-plugin/src/main/kotlin/dev/slne/surf/api/gradle/platform/minestom/MinestomSurfPlugin.kt Adds Minestom platform relocation rule for fastutil in the Gradle plugin DSL.
surf-api-gradle-plugin/src/main/kotlin/dev/slne/surf/api/gradle/platform/common/CommonSurfPlugin.kt Enables Kotlin javaParameters to retain method parameter names for Java reflection/debugging.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants