feat: implement DI

This commit is contained in:
Canny 2023-01-28 02:19:15 +03:00
parent b372f7ee84
commit 57e2632f38
3 changed files with 24 additions and 5 deletions

View file

@ -53,6 +53,12 @@ dependencies {
val composeVersion = "1.3.3"
implementation("androidx.compose.ui:ui:$composeVersion")
implementation("androidx.compose.ui:ui-tooling-preview:$composeVersion")
// Material 3
implementation("androidx.compose.material3:material3:1.0.1")
// Koin
implementation("io.insert-koin:koin-android:3.3.2")
implementation("io.insert-koin:koin-androidx-compose:3.4.1")
}

View file

@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools">
<application
android:name=".ManagerApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
@ -11,7 +12,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.ReVancedManager"
tools:targetApi="31">
tools:targetApi="33">
<activity
android:name=".MainActivity"
android:exported="true"
@ -21,10 +22,6 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
</application>

View file

@ -0,0 +1,16 @@
package app.revanced.manager.compose
import android.app.Application
import org.koin.android.ext.koin.androidContext
import org.koin.core.context.startKoin
class ManagerApplication: Application() {
override fun onCreate() {
super.onCreate()
startKoin {
androidContext(this@ManagerApplication)
modules(emptyList()) // TODO: Add modules
}
}
}