Skip to content

feat: service extraction#4828

Merged
jamesarich merged 35 commits intomainfrom
feat/service-extraction
Mar 17, 2026
Merged

feat: service extraction#4828
jamesarich merged 35 commits intomainfrom
feat/service-extraction

Conversation

@jamesarich
Copy link
Copy Markdown
Collaborator

This pull request is a major refactor that extracts Android-specific service, worker, and radio connection files from the app module into the new core:service and core:network modules. The goal is to improve code reuse, testability, and maintainability by isolating platform-specific logic and abstracting shared business logic into multiplatform modules. All imports, dependency injections, and references throughout the project have been updated to reflect these moves.

The most important changes are:

Service and Worker Extraction:

  • Android Service and Worker classes (such as MeshService, BootCompleteReceiver, ReplyReceiver, etc.) have been moved from org.meshtastic.app.service to org.meshtastic.core.service and their references updated across the codebase, including the AndroidManifest and all affected Kotlin files. [1] [2] [3] [4] [5] [6] [7] [8]

Radio and Network Refactoring:

  • Android radio connection logic, such as AndroidRadioInterfaceService, has been moved from app/repository/radio to core/network/radio, and imports updated accordingly. [1] [2]
  • Dependency declarations for radio/networking libraries and modules have been updated in core/network/build.gradle.kts.

Dependency Injection and Module Wiring:

  • Koin module imports and dependency injection setup have been updated to use the new locations for service and network modules, including adding CoreNetworkAndroidModule and updating ProbeTableProvider references. [1] [2]

Architecture Documentation and Planning:

  • New documentation and metadata files have been added to the conductor archive, specifying the motivation, requirements, and step-by-step implementation plan for the extraction. This includes updates to the tech stack and architecture documentation to reflect the new core modules. [1] [2] [3] [4] [5] [6] [7]

Minor Improvements and Bugfixes:

  • Small bugfixes and improvements, such as ensuring the correct destination is set in the Data object for commands, and defining minimum firmware version constants in DeviceVersion. [1] [2] [3] [4]

This refactor sets the foundation for better multiplatform support, easier testing, and cleaner separation between platform-specific and shared logic.

…rom app to core:service/androidMain and core:network/androidMain'
… app to core:service/androidMain and core:network/androidMain' as complete
…adio files from app to core:service/androidMain and core:network/androidMain'
…orker/radio files from app to core:service/androidMain and core:network/androidMain'
…rom app to core:service/androidMain and core:network/androidMain'
@github-actions github-actions bot added the enhancement New feature or request label Mar 17, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 13.38%. Comparing base (5eb6e50) to head (610a7a1).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...astic/core/service/MeshServiceNotificationsImpl.kt 0.00% 8 Missing ⚠️
.../kotlin/org/meshtastic/core/service/MeshService.kt 0.00% 6 Missing ⚠️
.../meshtastic/core/data/manager/CommandSenderImpl.kt 0.00% 3 Missing ⚠️
...core/network/radio/AndroidRadioInterfaceService.kt 0.00% 2 Missing ⚠️
...htastic/core/service/AndroidRadioControllerImpl.kt 0.00% 1 Missing ⚠️
.../org/meshtastic/core/service/MeshServiceStarter.kt 0.00% 1 Missing ⚠️
...stic/core/service/worker/ServiceKeepAliveWorker.kt 0.00% 1 Missing ⚠️
...htastic/android/meshserviceexample/MainActivity.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4828      +/-   ##
==========================================
+ Coverage   13.20%   13.38%   +0.18%     
==========================================
  Files         539      539              
  Lines       17763    17753      -10     
  Branches     2651     2651              
==========================================
+ Hits         2345     2376      +31     
+ Misses      15102    15058      -44     
- Partials      316      319       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesarich jamesarich added this pull request to the merge queue Mar 17, 2026
@jamesarich jamesarich removed this pull request from the merge queue due to the queue being cleared Mar 17, 2026
@jamesarich jamesarich merged commit 807db83 into main Mar 17, 2026
7 checks passed
@jamesarich jamesarich deleted the feat/service-extraction branch March 17, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant