-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from stslex/dev
dev
- Loading branch information
Showing
175 changed files
with
1,661 additions
and
2,999 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
33 changes: 17 additions & 16 deletions
33
app/src/main/java/st/slex/csplashscreen/SplashApplication.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 |
---|---|---|
@@ -1,25 +1,26 @@ | ||
package st.slex.csplashscreen | ||
|
||
import android.app.Application | ||
import st.slex.csplashscreen.core.core.api.AppApi | ||
import st.slex.csplashscreen.core.core.api.ApplicationApiProvider | ||
import st.slex.csplashscreen.di.app.AppComponent | ||
import st.slex.csplashscreen.di.app.DaggerAppComponent | ||
import org.koin.android.ext.koin.androidContext | ||
import org.koin.android.ext.koin.androidLogger | ||
import org.koin.core.context.GlobalContext.startKoin | ||
import org.koin.core.logger.Level | ||
import st.slex.csplashscreen.di.AppModules | ||
|
||
class SplashApplication : Application(), ApplicationApiProvider { | ||
|
||
private val appComponent: AppComponent by lazy { | ||
DaggerAppComponent | ||
.builder() | ||
.context(this) | ||
.build() | ||
} | ||
|
||
override val appApi: AppApi | ||
get() = appComponent | ||
class SplashApplication : Application() { | ||
|
||
override fun onCreate() { | ||
appComponent.inject(this) | ||
super.onCreate() | ||
initKoin() | ||
} | ||
|
||
private fun initKoin() { | ||
startKoin { | ||
androidLogger( | ||
level = if (BuildConfig.DEBUG) Level.ERROR else Level.NONE | ||
) | ||
androidContext(this@SplashApplication) | ||
modules(AppModules) | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
app/src/main/java/st/slex/csplashscreen/di/AppComponent.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,37 @@ | ||
package st.slex.csplashscreen.di | ||
|
||
import org.koin.androidx.viewmodel.dsl.viewModelOf | ||
import org.koin.dsl.module | ||
import st.slex.csplashscreen.core.collection.di.moduleCoreCollection | ||
import st.slex.csplashscreen.core.core.di.moduleCore | ||
import st.slex.csplashscreen.core.database.di.moduleCoreDatabase | ||
import st.slex.csplashscreen.core.favourite.di.moduleCoreFavourite | ||
import st.slex.csplashscreen.core.network.di.moduleCoreNetwork | ||
import st.slex.csplashscreen.core.photos.di.moduleCorePhotos | ||
import st.slex.csplashscreen.feature.collection.di.moduleFeatureSingleCollection | ||
import st.slex.csplashscreen.feature.favourite.di.moduleFeatureFavourite | ||
import st.slex.csplashscreen.feature.feature_photo_detail.di.moduleFeatureImageDetail | ||
import st.slex.csplashscreen.feature.home.di.moduleFeatureHome | ||
import st.slex.csplashscreen.feature.search.di.moduleFeatureSearchPhotos | ||
import st.slex.csplashscreen.feature.user.di.moduleFeatureUser | ||
import st.slex.csplashscreen.ui.InitialAppViewModel | ||
|
||
internal val appModule = module { | ||
viewModelOf(::InitialAppViewModel) | ||
} | ||
|
||
val AppModules = listOf( | ||
appModule, | ||
moduleCore, | ||
moduleCoreCollection, | ||
moduleCoreDatabase, | ||
moduleCoreFavourite, | ||
moduleCoreNetwork, | ||
moduleCorePhotos, | ||
moduleFeatureSingleCollection, | ||
moduleFeatureFavourite, | ||
moduleFeatureHome, | ||
moduleFeatureImageDetail, | ||
moduleFeatureSearchPhotos, | ||
moduleFeatureUser | ||
) |
24 changes: 0 additions & 24 deletions
24
app/src/main/java/st/slex/csplashscreen/di/app/AppComponent.kt
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
app/src/main/java/st/slex/csplashscreen/di/app/AppModule.kt
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
app/src/main/java/st/slex/csplashscreen/di/main/MainComponent.kt
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
app/src/main/java/st/slex/csplashscreen/di/main/MainComponentBuilder.kt
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
app/src/main/java/st/slex/csplashscreen/di/main/MainDependencies.kt
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
app/src/main/java/st/slex/csplashscreen/di/main/MainModule.kt
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.