I have an interface:
interface CartonRepository {
fun addToCart(company: Company): Completable
}
Now I want to use this interface in my use case:
class ObserveCartonItemSelectionUseCase
@Inject constructor(private val cartonRepository: CartonRepository) : ObservableUseCase<UUID, Boolean> {
}
and this use case is injected in other class by:
@Inject
protected lateinit var observeCartonSelectionUseCase: ObserveCartonItemSelectionUseCase
I get an error:
ApplicationComponent.java:13: error: CartonRepository cannot be provided without an @Provides-annotated method.
public abstract void inject(@org.jetbrains.annotations.NotNull()