--- a/geekdroid/build.gradle.kts Tue Nov 29 14:16:09 2022 -0400
+++ b/geekdroid/build.gradle.kts Tue Nov 29 14:47:37 2022 -0400
@@ -77,13 +77,11 @@
implementation("com.squareup.picasso:picasso:2.5.2")
implementation("com.squareup.okhttp3:okhttp:4.6.0")
- val daggerVersion = "2.28.3"
+ val daggerVersion = "2.44.1"
implementation(enforcedDaggerPlatform(daggerVersion))
kapt(enforcedDaggerPlatform(daggerVersion))
implementation("com.google.dagger:dagger:$daggerVersion")
kapt("com.google.dagger:dagger-compiler:$daggerVersion")
- compileOnly("com.squareup.inject:assisted-inject-annotations-dagger2:0.5.2")
- kapt("com.squareup.inject:assisted-inject-processor-dagger2:0.5.2")
implementation(enforcedPlatform(kotlin("bom")))
implementation(kotlin("stdlib-jdk8"))
--- a/geekdroid/src/main/java/com/geekorum/geekdroid/dagger/AssistedInjection.kt Tue Nov 29 14:16:09 2022 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Geekdroid is a utility library for development on the Android
- * Platform.
- *
- * Copyright (C) 2017-2022 by Frederic-Charles Barthelery.
- *
- * This file is part of Geekdroid.
- *
- * Geekdroid is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Geekdroid is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Geekdroid. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.geekorum.geekdroid.dagger
-
-import com.squareup.inject.assisted.dagger2.AssistedModule
-import dagger.Module
-
-/**
- * Allows to use Assisted injection
- * Generates binding for Assisted injection factories
- */
-@AssistedModule
-@Module(includes = [AssistedInject_GeekdroidAssistedModule::class])
-internal abstract class GeekdroidAssistedModule
--- a/geekdroid/src/main/java/com/geekorum/geekdroid/dagger/ViewModels.kt Tue Nov 29 14:16:09 2022 -0400
+++ b/geekdroid/src/main/java/com/geekorum/geekdroid/dagger/ViewModels.kt Tue Nov 29 14:47:37 2022 -0400
@@ -27,10 +27,11 @@
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import androidx.savedstate.SavedStateRegistryOwner
-import com.squareup.inject.assisted.Assisted
-import com.squareup.inject.assisted.AssistedInject
import dagger.MapKey
import dagger.Module
+import dagger.assisted.Assisted
+import dagger.assisted.AssistedFactory
+import dagger.assisted.AssistedInject
import dagger.multibindings.Multibinds
import javax.inject.Inject
import javax.inject.Provider
@@ -68,7 +69,7 @@
* ```
* @see [DaggerDelegateSavedStateVMFactory]
*/
-@Module(includes = [GeekdroidAssistedModule::class])
+@Module
abstract class ViewModelsModule private constructor() {
@Multibinds
@@ -137,7 +138,7 @@
throw IllegalArgumentException("No ViewModel providers for key $key and class $modelClass")
}
- @AssistedInject.Factory
+ @AssistedFactory
interface Creator {
fun create(owner: SavedStateRegistryOwner, defaultArgs: Bundle? = null): DaggerDelegateSavedStateVMFactory
}