Skip to content

Fix shaded scoreboard library integration with correct API exposure #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: version/1.21
Choose a base branch
from

Conversation

twisti-dev
Copy link
Contributor

@twisti-dev twisti-dev commented May 4, 2025

Overview of Changes

Resolved an issue where the scoreboard library was incorrectly loaded through the libs loader while its implementation was shaded. The patch ensures proper API exposure and runtime behavior by adjusting the dependency declarations and build configuration.

Details

  • IDE Configuration Update

    • Added commit inspection tools (CommitFormat, CommitNamingConvention) in .idea/vcs.xml to enforce consistent commit message formats.
  • Version Bump

    • Updated project version in gradle.properties from 1.21.4-2.13.3-SNAPSHOT to 1.21.4-2.13.4-SNAPSHOT to reflect the patch.
  • Dependency Scope Fix

    • Changed runtimeOnly to api for libs.scoreboard.library.implementation, libs.scoreboard.library.modern, and libs.scoreboard.library.api in surf-api-bukkit-server/build.gradle.kts to correctly expose the shaded scoreboard library during compilation and runtime.

Motivation

The scoreboard library was improperly configured, causing it to be loaded at runtime but not properly exposed as an API due to shading. This fix aligns the dependency scope to ensure consistent functionality and developer access.

Impact

  • Ensures the scoreboard library is available and correctly exposed in consuming modules.
  • Reduces potential runtime issues related to missing or improperly loaded classes.
  • Improves developer experience by aligning build behavior with shading expectations.

Testing

  • Manual validation of classpath visibility for scoreboard classes.
  • Verified successful build and runtime loading of the scoreboard module with updated dependency declarations.

Additional Notes

  • Commit inspection tools were added as part of improving VCS hygiene. Future commits will benefit from enforced formatting rules.
  • Consider auditing other shaded libraries for similar inconsistencies.
  • Closes Scoreboard Libary Error #92

Download Build‑JARs for this PR: pr-built-jars.zip

@twisti-dev twisti-dev self-assigned this May 4, 2025
@Copilot Copilot AI review requested due to automatic review settings May 4, 2025 19:09
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (3)
  • .idea/vcs.xml: Language not supported
  • gradle.properties: Language not supported
  • surf-api-bukkit/surf-api-bukkit-server/build.gradle.kts: Language not supported

@twisti-dev twisti-dev requested a review from a team May 5, 2025 17:05
Copy link
Contributor

@ammodev ammodev left a comment

Choose a reason for hiding this comment

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

Whats requested

@twisti-dev
Copy link
Contributor Author

Obviously a review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scoreboard Libary Error
2 participants