forked from square/dagger
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
When trying to upgrade to patch version 2.57.2 (from version 2.57.1), I'm facing the following issue (for the first time):
> Task :app:hiltJavaCompileWeeklyDebug FAILED
error: ComponentProcessingStep was unable to process 'com.comuto.squirrel.MainApp_HiltComponents.SingletonC' because 'io.getstream.chat.android.client.plugin.factory.PluginFactory' could not be resolved.
Dependency trace:
=> element (CLASS): com.comuto.squirrel.android.datasource.chat.di.ChatApiModule
=> element (METHOD): provideOfflinePluginFactory(android.content.Context)
=> type (EXECUTABLE method): (android.content.Context)io.getstream.chat.android.client.plugin.factory.PluginFactory
=> type (ERROR return type): io.getstream.chat.android.client.plugin.factory.PluginFactory
If type 'io.getstream.chat.android.client.plugin.factory.PluginFactory' is a generated type, check above for compilation errors that may have prevented the type from being generated. Otherwise, ensure that type 'io.getstream.chat.android.client.plugin.factory.PluginFactory' is on your classpath.
1 error
error: ComponentProcessingStep was unable to process 'com.comuto.squirrel.MainApp_HiltComponents.SingletonC' because 'io.getstream.chat.android.client.plugin.factory.PluginFactory' could not be resolved.The ChatApiModule of my modularized app exposes the third-party type PluginFactory:
import io.getstream.chat.android.client.plugin.factory.PluginFactory
import io.getstream.chat.android.offline.plugin.factory.StreamOfflinePluginFactory
import io.getstream.chat.android.state.plugin.config.StatePluginConfig
import io.getstream.chat.android.state.plugin.factory.StreamStatePluginFactory
@Module
@InstallIn(SingletonComponent::class)
internal object ChatApiModule {
@Qualifier
@Retention(AnnotationRetention.RUNTIME)
annotation class ClientOfflinePluginFactory
@Qualifier
@Retention(AnnotationRetention.RUNTIME)
annotation class ClientStatePluginFactory
@Provides
@ClientOfflinePluginFactory
fun provideOfflinePluginFactory(@ChatApplicationContext applicationContext: Context): PluginFactory =
StreamOfflinePluginFactory(appContext = applicationContext)
@Provides
@ClientStatePluginFactory
fun provideStatePluginFactory(@ChatApplicationContext applicationContext: Context): PluginFactory =
StreamStatePluginFactory(
appContext = applicationContext,
config = StatePluginConfig(backgroundSyncEnabled = true, userPresence = true)
)
}Here's a preview of the app configuration:
- Gradle 9.1.0
- AGP
8.13.0 :appmodule'sbuild.gradle.kts:plugins { id("com.android.application") id("com.google.devtools.ksp") // KSP version: 2.2.20-2.0.4 id("com.google.dagger.hilt.android") kotlin("android") } hilt { enableAggregatingTask = true } dependencies { implementation(libs.google.hilt.android) // com.google.dagger:hilt-android:2.57.2 ksp(libs.google.hilt.compiler) // com.google.dagger:hilt-compiler:2.57.2 implementation(project(":chat")) // [...] }:chatmodule'sbuild.gradle.kts:plugins { id("com.android.library") id("com.google.devtools.ksp") // KSP version: 2.2.20-2.0.4 kotlin("android") } android { namespace = "com.comuto.squirrel.android.api.chat" } dependencies { implementation(libs.google.hilt.core) // com.google.dagger:hilt-core:2.57.2 ksp(libs.google.hilt.compiler) // com.google.dagger:hilt-compiler:2.57.2 implementation(libs.getStreamChat.client) // io.getstream:stream-chat-android-client:6.24.0 implementation(libs.getStreamChat.offline) // io.getstream:stream-chat-android-offline:6.24.0 implementation(libs.getStreamChat.state) // io.getstream:stream-chat-android-state:6.24.0 // [...] }
adi-gnm
Metadata
Metadata
Assignees
Labels
No labels