diff --git a/app/build.gradle b/app/build.gradle index b6a2728..fc7b77a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,7 +3,7 @@ plugins { id 'com.google.gms.google-services' id 'org.jetbrains.kotlin.android' id 'kotlin-kapt' - id 'dagger.hilt.android.plugin' + id 'com.google.dagger.hilt.android' id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' } @@ -56,6 +56,9 @@ android { buildFeatures { viewBinding true } + kapt { + correctErrorTypes true + } } dependencies { @@ -83,9 +86,12 @@ dependencies { // Kotlin Coroutines implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" + // Kotlin Reflect + implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.10" + // Dagger-Hilt - implementation "com.google.dagger:hilt-android:2.38.1" - kapt "com.google.dagger:hilt-compiler:2.40.5" + implementation "com.google.dagger:hilt-android:2.44" + kapt "com.google.dagger:hilt-compiler:2.44" // Room Wrapper implementation "androidx.room:room-runtime:2.4.3" diff --git a/app/src/main/java/me/abolfazl/nmock/receiver/GPSBroadcastReceiver.kt b/app/src/main/java/me/abolfazl/nmock/receiver/GPSBroadcastReceiver.kt index 36f31d5..f20d5e6 100644 --- a/app/src/main/java/me/abolfazl/nmock/receiver/GPSBroadcastReceiver.kt +++ b/app/src/main/java/me/abolfazl/nmock/receiver/GPSBroadcastReceiver.kt @@ -11,7 +11,7 @@ class GPSBroadcastReceiver : BroadcastReceiver() { private var receiverRegistered = false override fun onReceive(context: Context, intent: Intent?) { - if (intent != null && intent?.action != null) { + if (intent != null && intent.action != null) { if (intent.action.equals("android.location.PROVIDERS_CHANGED")) { callBack?.invoke() } diff --git a/build.gradle b/build.gradle index 1710246..ce19e46 100644 --- a/build.gradle +++ b/build.gradle @@ -15,6 +15,7 @@ plugins { id 'com.android.library' version '7.1.2' apply false id 'org.jetbrains.kotlin.android' version '1.6.21' apply false id 'io.sentry.android.gradle' version '3.1.0-beta.1' + id 'com.google.dagger.hilt.android' version '2.44' apply false id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.1' apply false }