mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: migrate from Hilt to Koin and expand KMP common modules (#4746)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
a5390a80e7
commit
875cf1cff2
440 changed files with 3738 additions and 3508 deletions
|
|
@ -18,7 +18,7 @@ plugins {
|
|||
alias(libs.plugins.meshtastic.kmp.library)
|
||||
alias(libs.plugins.meshtastic.kmp.library.compose)
|
||||
alias(libs.plugins.meshtastic.kotlinx.serialization)
|
||||
alias(libs.plugins.devtools.ksp)
|
||||
alias(libs.plugins.meshtastic.koin)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
|
@ -45,12 +45,11 @@ kotlin {
|
|||
implementation(projects.core.di)
|
||||
|
||||
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
||||
implementation(libs.javax.inject)
|
||||
implementation(libs.koin.compose.viewmodel)
|
||||
}
|
||||
|
||||
androidMain.dependencies {
|
||||
implementation(project.dependencies.platform(libs.androidx.compose.bom))
|
||||
implementation(libs.androidx.hilt.lifecycle.viewmodel.compose)
|
||||
implementation(libs.androidx.datastore)
|
||||
implementation(libs.androidx.datastore.preferences)
|
||||
implementation(libs.accompanist.permissions)
|
||||
|
|
@ -68,7 +67,6 @@ kotlin {
|
|||
implementation(libs.androidx.savedstate.ktx)
|
||||
implementation(libs.material)
|
||||
implementation(libs.kermit)
|
||||
implementation(libs.hilt.android)
|
||||
}
|
||||
|
||||
androidUnitTest.dependencies {
|
||||
|
|
@ -81,8 +79,3 @@ kotlin {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
add("kspAndroid", libs.androidx.hilt.compiler)
|
||||
add("kspAndroid", libs.hilt.compiler)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,15 +16,14 @@
|
|||
*/
|
||||
package org.meshtastic.feature.map
|
||||
|
||||
import org.koin.core.annotation.KoinViewModel
|
||||
import org.meshtastic.core.model.RadioController
|
||||
import org.meshtastic.core.repository.MapPrefs
|
||||
import org.meshtastic.core.repository.NodeRepository
|
||||
import org.meshtastic.core.repository.PacketRepository
|
||||
import javax.inject.Inject
|
||||
|
||||
open class SharedMapViewModel
|
||||
@Inject
|
||||
constructor(
|
||||
@KoinViewModel
|
||||
open class SharedMapViewModel(
|
||||
mapPrefs: MapPrefs,
|
||||
nodeRepository: NodeRepository,
|
||||
packetRepository: PacketRepository,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright (c) 2026 Meshtastic LLC
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.meshtastic.feature.map.di
|
||||
|
||||
import org.koin.core.annotation.ComponentScan
|
||||
import org.koin.core.annotation.Module
|
||||
|
||||
@Module
|
||||
@ComponentScan("org.meshtastic.feature.map")
|
||||
class FeatureMapModule
|
||||
Loading…
Add table
Add a link
Reference in a new issue