Skip to content

Commit

Permalink
Change koin module names for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
julieminer committed Aug 21, 2024
1 parent f86254b commit ed5c1fd
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import org.koin.dsl.module

val AppDataServiceModule = module {
val DataAppDataModule = module {
factory { CoroutineScope(Dispatchers.IO) }
single<AppDataService> {
AppDataServiceImpl(get(), get())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package com.melonhead.data_at_home.di

import com.melonhead.data_at_home.AtHomeService
import com.melonhead.data_at_home.AtHomeServiceImpl
import com.melonhead.lib_networking.di.NetworkingModule
import com.melonhead.lib_networking.di.LibNetworkingModule
import org.koin.dsl.module

val DataAtHomeServiceModule = module {
includes(NetworkingModule)
val DataAtHomeModule = module {
includes(LibNetworkingModule)
single<AtHomeService> {
AtHomeServiceImpl(get())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package com.melonhead.data_authentication.di

import com.melonhead.data_authentication.services.LoginService
import com.melonhead.data_authentication.services.LoginServiceImpl
import com.melonhead.lib_networking.di.NetworkingModule
import com.melonhead.lib_networking.di.LibNetworkingModule
import org.koin.dsl.module

val DataAuthenticationModule = module {
includes(NetworkingModule)
includes(LibNetworkingModule)
single<LoginService> {
LoginServiceImpl(get())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package com.melonhead.data_user.di

import com.melonhead.data_user.services.UserService
import com.melonhead.data_user.services.UserServiceImpl
import com.melonhead.lib_networking.di.NetworkingModule
import com.melonhead.lib_networking.di.LibNetworkingModule
import org.koin.dsl.module

val UserServiceModule = module {
includes(NetworkingModule)
val DataUserModule = module {
includes(LibNetworkingModule)
single<UserService> { UserServiceImpl(get()) }

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.melonhead.feature_authentication.di

import com.melonhead.data_app_data.di.AppDataServiceModule
import com.melonhead.data_app_data.di.DataAppDataModule
import com.melonhead.data_authentication.di.DataAuthenticationModule
import com.melonhead.data_user.di.UserServiceModule
import com.melonhead.data_user.di.DataUserModule
import com.melonhead.feature_authentication.AuthRepository
import com.melonhead.feature_authentication.AuthRepositoryImpl
import com.melonhead.feature_authentication.navigation.LoginScreenResolver
Expand All @@ -21,9 +21,8 @@ val FeatureAuthenticationModule = module {
includes(LibAppContextModule)

includes(DataAuthenticationModule)

includes(AppDataServiceModule)
includes(UserServiceModule)
includes(DataAppDataModule)
includes(DataUserModule)

single<AuthRepository> { AuthRepositoryImpl(get(), get(), get(), get(), get(), get(), get(), get()) }
single<LoginScreenResolver>(createdAtStart = true) { LoginScreenResolver() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import com.melonhead.lib_core.models.*
import com.melonhead.data_app_data.AppDataService
import com.melonhead.data_at_home.AtHomeService
import com.melonhead.data_user.services.UserService
import com.melonhead.feature_chapter_cache.ChapterCacheMechanism
import com.melonhead.lib_chapter_cache.ChapterCacheMechanism
import com.melonhead.feature_manga_list.services.MangaService
import com.melonhead.lib_app_context.AppContext
import com.melonhead.lib_app_events.AppEventsRepository
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
package com.melonhead.feature_manga_list.di

import androidx.lifecycle.viewmodel.compose.viewModel
import com.melonhead.data_app_data.di.AppDataServiceModule
import com.melonhead.data_at_home.di.DataAtHomeServiceModule
import com.melonhead.data_app_data.di.DataAppDataModule
import com.melonhead.data_at_home.di.DataAtHomeModule
import com.melonhead.feature_manga_list.MangaRepository
import com.melonhead.feature_manga_list.MangaRepositoryImpl
import com.melonhead.feature_manga_list.services.MangaService
import com.melonhead.feature_manga_list.services.MangaServiceImpl
import com.melonhead.data_user.di.UserServiceModule
import com.melonhead.feature_chapter_cache.di.ChapterCacheModule
import com.melonhead.data_user.di.DataUserModule
import com.melonhead.lib_chapter_cache.di.LibChapterCacheModule
import com.melonhead.feature_manga_list.navigation.MangaListScreenResolver
import com.melonhead.feature_manga_list.viewmodels.MangaListViewModel
import com.melonhead.lib_app_context.di.LibAppContextModule
import com.melonhead.lib_app_events.di.LibAppEventsModule
import com.melonhead.lib_database.di.DBModule
import com.melonhead.lib_networking.di.NetworkingModule
import com.melonhead.lib_database.di.LibDbModule
import com.melonhead.lib_networking.di.LibNetworkingModule
import com.melonhead.lib_notifications.di.LibNotificationsModule
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.dsl.module
Expand All @@ -23,13 +22,13 @@ val FeatureMangaListModule = module {
includes(LibAppEventsModule)
includes(LibNotificationsModule)
includes(LibAppContextModule)
includes(DBModule)
includes(ChapterCacheModule)
includes(NetworkingModule)
includes(LibDbModule)
includes(LibChapterCacheModule)
includes(LibNetworkingModule)

includes(UserServiceModule)
includes(AppDataServiceModule)
includes(DataAtHomeServiceModule)
includes(DataUserModule)
includes(DataAppDataModule)
includes(DataAtHomeModule)

single<MangaService> {
MangaServiceImpl(get())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.melonhead.feature_native_chapter_viewer.di

import com.melonhead.data_app_data.di.AppDataServiceModule
import com.melonhead.data_app_data.di.DataAppDataModule
import com.melonhead.feature_native_chapter_viewer.viewmodels.ChapterViewModel
import com.melonhead.feature_native_chapter_viewer.navigation.NativeChapterViewerActivityResolver
import com.melonhead.lib_app_events.di.LibAppEventsModule
Expand All @@ -11,7 +11,7 @@ import org.koin.dsl.module
val FeatureNativeChapterViewerModule = module {
includes(LibAppEventsModule)
includes(LibNavigationModule)
includes(AppDataServiceModule)
includes(DataAppDataModule)

viewModel {
ChapterViewModel(get(), get(), get())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.melonhead.feature_chapter_cache
package com.melonhead.lib_chapter_cache

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.melonhead.feature_chapter_cache
package com.melonhead.lib_chapter_cache

import com.melonhead.lib_database.chapter.ChapterEntity

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.melonhead.lib_chapter_cache.di

import com.melonhead.lib_chapter_cache.ChapterCacheMechanism
import com.melonhead.lib_chapter_cache.ChapterCacheMechanismImpl
import com.melonhead.lib_database.di.LibDbModule
import org.koin.dsl.module

val LibChapterCacheModule = module {
includes(LibDbModule)
single<ChapterCacheMechanism> {
ChapterCacheMechanismImpl()
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.melonhead.feature_chapter_cache
package com.melonhead.lib_chapter_cache

import org.junit.Test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import com.melonhead.lib_database.manga.MangaDatabase
import com.melonhead.lib_database.readmarkers.ReadMarkerDatabase
import org.koin.dsl.module

val DBModule = module {
val LibDbModule = module {
single(createdAtStart = true) {
Room.databaseBuilder(
get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import kotlinx.serialization.json.Json
import org.koin.dsl.module
import kotlin.time.DurationUnit

val NetworkingModule = module {
val LibNetworkingModule = module {
single {
HttpClient(CIO) {
install(RateLimit) {
Expand Down

0 comments on commit ed5c1fd

Please sign in to comment.