From 57e2632f38e83876798c171186436cc00d2b21b3 Mon Sep 17 00:00:00 2001 From: Canny Date: Sat, 28 Jan 2023 02:19:15 +0300 Subject: [PATCH] feat: implement DI --- app/build.gradle.kts | 6 ++++++ app/src/main/AndroidManifest.xml | 7 ++----- .../manager/compose/ManagerApplication.kt | 16 ++++++++++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 app/src/main/java/app/revanced/manager/compose/ManagerApplication.kt diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b8d4b4f0..4514b39e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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") + } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f9205422..ef44dc1a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools"> + tools:targetApi="33"> - - diff --git a/app/src/main/java/app/revanced/manager/compose/ManagerApplication.kt b/app/src/main/java/app/revanced/manager/compose/ManagerApplication.kt new file mode 100644 index 00000000..5afdddc9 --- /dev/null +++ b/app/src/main/java/app/revanced/manager/compose/ManagerApplication.kt @@ -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 + } + } +} \ No newline at end of file