feat(01-04): add Android MainApplication + manifest registration
- MainApplication.onCreate calls configureLogging() then initKoin { androidContext(...) }
- AndroidManifest registers android:name=".MainApplication"
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<application
|
<application
|
||||||
|
android:name=".MainApplication"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package dev.ulfrx.recipe
|
||||||
|
|
||||||
|
import android.app.Application
|
||||||
|
import dev.ulfrx.recipe.di.initKoin
|
||||||
|
import dev.ulfrx.recipe.logging.configureLogging
|
||||||
|
import org.koin.android.ext.koin.androidContext
|
||||||
|
|
||||||
|
class MainApplication : Application() {
|
||||||
|
override fun onCreate() {
|
||||||
|
super.onCreate()
|
||||||
|
configureLogging()
|
||||||
|
initKoin {
|
||||||
|
androidContext(this@MainApplication)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user