mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-05-30 09:37:13 -04:00
3.7 KiB
3.7 KiB
title, parent, nav_order, last_updated, aliases
| title | parent | nav_order | last_updated | aliases | |||
|---|---|---|---|---|---|---|---|
| Codebase | Developer Guide | 2 | 2026-05-13 |
|
Codebase
Repository layout, namespacing conventions, and build system overview.
Repository Structure
Meshtastic-Android/
├── androidApp/ # Android application module
│ ├── src/main/ # Shared Android code
│ ├── src/google/ # Google Play flavor (Gemini, proprietary)
│ └── src/fdroid/ # F-Droid flavor (FOSS-only)
├── desktopApp/ # Desktop JVM application
├── feature/ # Feature modules (KMP)
│ ├── intro/
│ ├── messaging/
│ ├── connections/
│ ├── map/
│ ├── node/
│ ├── settings/
│ ├── firmware/
│ ├── docs/
│ ├── wifi-provision/
│ └── widget/
├── core/ # Core infrastructure modules (KMP)
│ ├── api/
│ ├── barcode/
│ ├── ble/
│ ├── common/
│ ├── data/
│ ├── database/
│ ├── datastore/
│ ├── di/
│ ├── domain/
│ ├── model/
│ ├── navigation/
│ ├── network/
│ ├── nfc/
│ ├── prefs/
│ ├── proto/
│ ├── repository/
│ ├── resources/
│ ├── service/
│ ├── takserver/
│ ├── testing/
│ └── ui/
├── build-logic/ # Convention plugins and build helpers
│ └── convention/
├── docs/ # Documentation source (markdown)
│ ├── user/
│ └── developer/
├── gradle/ # Gradle wrapper and version catalog
│ └── libs.versions.toml
├── specs/ # Feature specifications
└── .github/workflows/ # CI/CD workflows
Namespacing Convention
All Kotlin packages follow the pattern:
org.meshtastic.{layer}.{module}.{subpackage}
Examples:
org.meshtastic.core.navigation— core navigation moduleorg.meshtastic.feature.docs.ui— docs feature UI packageorg.meshtastic.app.di— app DI configuration
Build System
Gradle Kotlin DSL
All build files use Kotlin DSL (.gradle.kts). Configuration:
- Version catalog:
gradle/libs.versions.toml - Convention plugins:
build-logic/convention/ - Settings:
settings.gradle.kts
Convention Plugins
Located in build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/:
| Plugin | Purpose |
|---|---|
meshtastic.kmp.feature |
Standard feature module setup |
meshtastic.kmp.jvm.android |
JVM + Android target configuration |
meshtastic.kotlinx.serialization |
Serialization plugin setup |
Build Variants (Android)
| Flavor | Description |
|---|---|
google |
Google Play distribution; includes proprietary APIs |
fdroid |
F-Droid distribution; FOSS-only dependencies |
Key Gradle Tasks
# Compile check across all KMP targets
./gradlew kmpSmokeCompile
# Run all tests
./gradlew allTests
# Code quality
./gradlew spotlessCheck detekt
# Android build
./gradlew assembleGoogleDebug assembleFdroidDebug
# Desktop run
./gradlew :desktopApp:run
Version Catalog Highlights
Key dependencies in gradle/libs.versions.toml:
| Category | Library |
|---|---|
| Compose | Compose Multiplatform (JetBrains) |
| Navigation | Navigation 3 |
| DI | Koin (annotations) |
| Serialization | kotlinx.serialization |
| Database | Room KMP |
| Networking | Ktor |
| Markdown | multiplatform-markdown-renderer |
| Testing | kotlin-test, compose-ui-test |