chore: bump version to 3.0.5 and refactor companion object in SurfPaperPacketApi#300
chore: bump version to 3.0.5 and refactor companion object in SurfPaperPacketApi#300ammodev merged 2 commits intoversion/26.1from
Conversation
… lore listener registration methods
|
This PR contains changes that modified the public API. To update the reference ABI dumps: ./gradlew updateKotlinAbi
git add **/api/**
git commit -m "Update ABI reference"
git pushAfter updating, the CI will pass. Make sure the changes are backward compatible. |
There was a problem hiding this comment.
Pull request overview
This PR bumps the project version to 3.0.5 and refactors SurfPaperPacketApi’s companion object to follow the common “delegated companion singleton” pattern used across the Paper APIs.
Changes:
- Bump Gradle project version from
3.0.4→3.0.5. - Refactor
SurfPaperPacketApicompanion object to delegateSurfPaperPacketApito the service-resolvedapi.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| surf-api-paper/surf-api-paper/src/main/kotlin/dev/slne/surf/api/paper/packet/SurfPaperPacketApi.kt | Refactors companion object to companion object : SurfPaperPacketApi by api, keeping INSTANCE as the service entrypoint. |
| gradle.properties | Increments project version to 3.0.5. |
|
|
||
| companion object { | ||
| @JvmStatic | ||
| companion object : SurfPaperPacketApi by api { |
There was a problem hiding this comment.
Removing @JvmStatic from the INSTANCE property changes the Java-facing API: callers that previously used SurfPaperPacketApi.getINSTANCE() (and binaries compiled against it) will break and now must use SurfPaperPacketApi.Companion.getINSTANCE(). If Java/source+binary compatibility is intended, keep @JvmStatic on INSTANCE (even with the delegated companion), or explicitly treat this as a breaking API change and version accordingly (and update ABI dump).
| companion object : SurfPaperPacketApi by api { | |
| companion object : SurfPaperPacketApi by api { | |
| @JvmStatic |
| group=dev.slne.surf.api | ||
| version=3.0.4 | ||
| version=3.0.5 |
There was a problem hiding this comment.
This is a patch-version bump, but the companion-object refactor in SurfPaperPacketApi can be a breaking change for Java callers/binary compatibility (loss of getINSTANCE() static accessor without @JvmStatic). Either preserve the previous Java API shape or consider a version bump consistent with a breaking change.
No description provided.