diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index cb0bb9771..1b88f67f8 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -1,6 +1,8 @@ plugins { id("com.android.application") id("org.jetbrains.kotlin.android") + id("com.google.devtools.ksp") + id("com.google.dagger.hilt.android") } android { @@ -24,7 +26,7 @@ android { } composeOptions { - kotlinCompilerExtensionVersion = "1.5.4" + kotlinCompilerExtensionVersion = "1.5.7" } buildTypes { @@ -64,6 +66,10 @@ dependencies { implementation("com.github.alorma:compose-settings-storage-preferences:1.0.3") implementation("com.google.accompanist:accompanist-permissions:0.33.2-alpha") + implementation("com.google.dagger:hilt-android:2.49") + ksp("com.google.dagger:dagger-compiler:2.49") + ksp("com.google.dagger:hilt-compiler:2.49") + // Android Studio Preview support implementation("androidx.compose.ui:ui-tooling-preview") debugImplementation("androidx.compose.ui:ui-tooling") diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 274c55e64..facfd24ca 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -25,7 +25,8 @@ android:label="@string/app_name" android:requestLegacyExternalStorage="true" android:roundIcon="@mipmap/ic_launcher_round" - android:theme="@style/Theme.MPD"> + android:theme="@style/Theme.MPD" + android:name=".MPDApplication"> @@ -53,8 +54,7 @@ + android:name=".Main" /> diff --git a/android/app/src/main/java/org/musicpd/MPDApplication.kt b/android/app/src/main/java/org/musicpd/MPDApplication.kt new file mode 100644 index 000000000..94d8709cc --- /dev/null +++ b/android/app/src/main/java/org/musicpd/MPDApplication.kt @@ -0,0 +1,9 @@ +package org.musicpd + +import android.app.Application +import dagger.hilt.android.HiltAndroidApp + +@HiltAndroidApp +class MPDApplication : Application() { + +} \ No newline at end of file diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 1b4c7195f..32ac8c304 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -1,5 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { id("com.android.application") version "8.1.2" apply false - id("org.jetbrains.kotlin.android") version "1.9.20" apply false + id("org.jetbrains.kotlin.android") version "1.9.21" apply false + id("com.google.devtools.ksp") version "1.9.22-1.0.16" apply false + id("com.google.dagger.hilt.android") version "2.49" apply false } \ No newline at end of file