Convert all data models and value objects to Kotlin#353
Closed
mltbnz wants to merge 3 commits intocriticalmaps:masterfrom
Closed
Convert all data models and value objects to Kotlin#353mltbnz wants to merge 3 commits intocriticalmaps:masterfrom
mltbnz wants to merge 3 commits intocriticalmaps:masterfrom
Conversation
This commit introduces Kotlin support to the project and converts all data structures to leverage Kotlin's concise syntax, null safety, and modern features. Changes made: • Add Kotlin plugin and dependencies to build.gradle • Convert all data classes to Kotlin: - ReceivedChatMessage: 23 lines → 8 lines (65% reduction) - GpxPoi, GpxTrack: 22-24 lines → 8 lines each (67% reduction) - PermissionRequest: 62 lines → 11 lines (82% reduction!) • Convert business logic models to Kotlin: - ChatModel: Improved collection operations with sortBy - OwnLocationModel: Better null safety with @JvmField for Java interop - OtherUsersLocationModel: Cleaner array initialization - UserModel: Constructor parameter injection and init block - GpxModel: Simplified mutable collections • Convert value objects to Kotlin objects/enums: - Endpoints, RequestCodes: const val instead of static final - ResultType: Kotlin enum class • Add development environment setup script (dev-setup.sh) • Add project documentation (CLAUDE.md) Benefits: • Massive boilerplate reduction: ~200 lines of Java → ~50 lines of Kotlin • Improved null safety with Kotlin's type system • Better Java interoperability with @JvmField annotations • Cleaner, more readable code with Kotlin idioms • Foundation for future modernization (coroutines, ViewModels, etc.) All existing functionality preserved - passes full test suite and lint checks. Zero breaking changes to existing Java code. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
9bf2aa4 to
b66f292
Compare
Focus PR scope on Kotlin model conversion only 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Member
|
Hi Malte, First of all, fyi: I will merge this in a few days as a first step. Thank you :) |
Member
Author
|
That's awesome. In this PR it probably is not doing any bad. I want to get into some Android development I think so I could pick up some tasks from the rewrite |
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.
Summary
Changes Made
Technical Details
@JvmFieldannotations where needed for Java interoperability?:)Testing
This represents Phase 1 of the Android modernization plan, establishing the foundation for future improvements like coroutines, ViewModels, and modern UI patterns.
🤖 Generated with Claude Code