Move geometry package to core:domain#3601
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request undertakes a significant architectural refactoring by relocating the geometry package to a new Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
…-geometry-classes # Conflicts: # app/src/main/java/org/groundplatform/android/ui/home/mapcontainer/jobs/LoiJobSheet.kt
There was a problem hiding this comment.
Code Review
This pull request is a significant refactoring that moves the geometry package into the :core:domain module, successfully decoupling domain models from Android-specific dependencies. The changes are well-executed, including moving files, updating imports, and refactoring code to eliminate dependencies on the Google Maps SDK from the domain layer. Key changes like moving the area calculation to GmsExt.kt and re-implementing centerOrError in pure Kotlin are commendable. I have one suggestion to improve the naming of a test file for better code clarity and maintainability.
Note: Security Review is unavailable for this PR.
core/domain/src/commonTest/kotlin/org/groundplatform/domain/util/UiFormatUtilTest.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/groundplatform/android/ui/util/UiFormatUtil.kt
Outdated
Show resolved
Hide resolved
…il/UiFormatUtilTest.kt Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3601 +/- ##
============================================
- Coverage 69.69% 69.59% -0.11%
- Complexity 1811 1814 +3
============================================
Files 349 346 -3
Lines 9675 9583 -92
Branches 1060 1028 -32
============================================
- Hits 6743 6669 -74
+ Misses 2298 2291 -7
+ Partials 634 623 -11
🚀 New features to boost your workflow:
|
Towards #3585 ; #3600
This PR moves the geometry package to
:core:domain. These classes will be needed for the new feature to share geometry by QR code, which will have its usecase in the domain module.Most changes listed are import updates, the only 'real' changes are:
areaout ofGeometryand toGmsExt, since it relies on google maps logic which is an android dependency at the momentcenterOrErrormethod insideGeometryto only use Kotlin logic to achieve the same that was done by the maps-specific logicLatLngBounds.center()UiFormatUtilfromPolygonUtil(which was moved to domain).PolygonUtilis then focused on calculations, whileUiFormatUtilhandles formatting area values to be presented in the UI@shobhitagarwal1612 PTAL?