KamilH
04/21/2022, 6:01 PMkotlin-inject
. After I setup everything I’m getting a following compilation error:
[ksp] <PATH_HERE> @Provides scope: Singleton must match component scope: null
It points to all of the following declarations in the app:
@Component
abstract class StorageModule {
@Singleton
@Provides
fun userQueries(database: DatabaseFactory): UserQueries =
database.database.userQueries
}
I have AppModule
and Singleton
annotation declared like that:
@Scope
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER)
annotation class Singleton
@Component
@Singleton
abstract class AppModule() {
(...)
}
Am I missing something? Have you ever seen such a problem before?