Update shadowJar task to relocate fastutil package - #403
Merged
Conversation
- add relocation for "it.unimi.dsi.fastutil" to "$relocationPrefix.fastutil" in shadowJar task - enable javaParameters in compilerOptions for better compatibility
…o chore/some-minestom-changes
Contributor
There was a problem hiding this comment.
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.fastutilin thesurf-api-minestommodule’sshadowJaroutput to the project relocation prefix. - Add a Minestom Gradle plugin relocation rule for
fastutil(aligned with existing Velocity behavior). - Enable Kotlin compiler
javaParametersinCommonSurfPluginto 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces improvements to dependency management and build configuration for the Minestom platform. The main changes focus on relocating the
fastutillibrary to avoid conflicts, and enhancing compiler settings for better debugging and compatibility.Dependency relocation:
it.unimi.dsi.fastutilpackage to a project-specific namespace in theshadowJartask insurf-api-minestom/build.gradle.kts, preventing dependency clashes.it.unimi.dsi.fastutiltofastutil, ensuring runtime isolation.Build configuration improvements:
javaParametersin the Kotlin compiler options withinCommonSurfPlugin, which improves reflection and debugging capabilities by retaining parameter names.