-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: 🚚 split koin modules by feature (#22)
- Loading branch information
1 parent
3d3bdf0
commit 096d5cd
Showing
8 changed files
with
66 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
11 changes: 11 additions & 0 deletions
11
app/src/main/java/es/ffgiraldez/comicsearch/navigation/di/androidModule.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package es.ffgiraldez.comicsearch.navigation.di | ||
|
||
import es.ffgiraldez.comicsearch.navigation.Navigator | ||
import org.koin.dsl.module.applicationContext | ||
|
||
const val ACTIVITY_PARAM: String = "activity" | ||
const val CONTEXT_PARAM: String = "context" | ||
|
||
val navigationModule = applicationContext { | ||
factory { params -> Navigator(params[ACTIVITY_PARAM]) } | ||
} |
This file contains 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
This file contains 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
14 changes: 14 additions & 0 deletions
14
app/src/main/java/es/ffgiraldez/comicsearch/query/search/di/SearchModule.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package es.ffgiraldez.comicsearch.query.search.di | ||
|
||
import es.ffgiraldez.comicsearch.query.search.data.SearchLocalDataSource | ||
import es.ffgiraldez.comicsearch.query.search.data.SearchRemoteDataSource | ||
import es.ffgiraldez.comicsearch.query.search.data.SearchRepository | ||
import es.ffgiraldez.comicsearch.query.search.presentation.SearchViewModel | ||
import org.koin.dsl.module.applicationContext | ||
|
||
val searchModule = applicationContext { | ||
factory { SearchLocalDataSource(get({ it.values })) } | ||
factory { SearchRemoteDataSource(get()) } | ||
factory { SearchRepository(get({ it.values }), get()) } | ||
factory { SearchViewModel(get()) } | ||
} |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/es/ffgiraldez/comicsearch/query/sugestion/di/SuggestionModule.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package es.ffgiraldez.comicsearch.query.sugestion.di | ||
|
||
import es.ffgiraldez.comicsearch.query.sugestion.data.SuggestionLocalDataSource | ||
import es.ffgiraldez.comicsearch.query.sugestion.data.SuggestionRemoteDataSource | ||
import es.ffgiraldez.comicsearch.query.sugestion.data.SuggestionRepository | ||
import es.ffgiraldez.comicsearch.query.sugestion.presentation.SuggestionViewModel | ||
import org.koin.dsl.module.applicationContext | ||
|
||
val suggestionModule = applicationContext { | ||
factory { SuggestionLocalDataSource(get({ it.values })) } | ||
factory { SuggestionRemoteDataSource(get()) } | ||
factory { SuggestionRepository(get({ it.values }), get()) } | ||
factory { SuggestionViewModel(get({ it.values })) } | ||
} |
This file contains 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