Skip to content

Commit

Permalink
Настроен DI KOIN
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyRyabitckiy committed Aug 2, 2024
1 parent 2e6cb40 commit 22ff440
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package ru.practicum.android.diploma.di

import org.koin.dsl.module

val dataModule = module {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package ru.practicum.android.diploma.di

import org.koin.dsl.module

val interactorModule = module {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package ru.practicum.android.diploma.di

import org.koin.dsl.module

val repositoryModule = module {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package ru.practicum.android.diploma.di

import org.koin.dsl.module

val viewModelModule = module {

}
16 changes: 15 additions & 1 deletion app/src/main/java/ru/practicum/android/diploma/util/App.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
package ru.practicum.android.diploma.util

import android.app.Application
import org.koin.android.ext.koin.androidContext
import org.koin.core.context.startKoin
import ru.practicum.android.diploma.di.dataModule
import ru.practicum.android.diploma.di.interactorModule
import ru.practicum.android.diploma.di.repositoryModule
import ru.practicum.android.diploma.di.viewModelModule

class App : Application()
class App : Application() {
override fun onCreate() {
super.onCreate()
startKoin {
androidContext(this@App)
modules(dataModule, repositoryModule, interactorModule, viewModelModule)
}
}
}

0 comments on commit 22ff440

Please sign in to comment.