-
Notifications
You must be signed in to change notification settings - Fork 1.5k
build: Port geometry and quadtree packages to Kotlin #1569
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
Conversation
This commit migrates the `PointQuadTree` class and its corresponding test, `PointQuadTreeTest`, from Java to idiomatic Kotlin. This conversion modernizes the codebase, improving its conciseness, readability, and null safety. The key changes are: - **`PointQuadTree` to Kotlin**: The core `PointQuadTree` class has been rewritten in Kotlin, leveraging features like primary constructors, companion objects, and stricter nullability. - **`PointQuadTreeTest` to Kotlin**: The associated test class has also been ported to Kotlin, resulting in more streamlined test code. - **Copyright Header Update**: The copyright year has been updated in the converted files.
This commit modernizes the `Point` and `Bounds` classes by converting them from Java to idiomatic Kotlin. This change improves code conciseness, readability, and null safety. Key changes include: - The `Point` and `Bounds` classes are now written in Kotlin. - `@JvmField` annotations are used on properties to maintain binary compatibility for Java consumers. - New unit tests, `PointTest.kt` and `BoundsTest.kt`, have been added to ensure the correctness of the ported classes.
Code Coverage
|
|
Generally thinking: this would release a new version. I don't think this is intrinsically wrong, but wondering if we should instead annotate it with the prefix build" until we have more code written in Kotlin. |
kikoso
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
🎉 This PR is included in version 3.16.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 3.16.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This PR migrates the
quadtreeandgeometrypackages from Java to modern, idiomatic Kotlin.Key Changes:
PointQuadTreeto Kotlin: The corePointQuadTreeclass and its tests have been rewritten in Kotlin, improving conciseness and null safety.PointandBoundsto Kotlin: The fundamentalPointandBoundsclasses in thegeometrypackage have been ported to Kotlin.@JvmFieldand anopen classwith a manualcopy()implementation forPoint.PointandBounds, which previously had no dedicated test coverage.Verification:
This work modernizes key, platform-independent parts of the library and sets a strong foundation for future Kotlin migrations.