Revert "Fix binding set of interceptors twice in release"

This reverts commit 31089eb499.
This commit is contained in:
Kirill Kamakin
2022-12-11 20:32:02 +01:00
parent f6c0e862fc
commit f1ee255c9f

View File

@@ -0,0 +1,20 @@
package gq.kirmanak.mealient
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import okhttp3.Interceptor
import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class)
object ReleaseModule {
// Release version of the application doesn't have any interceptors but this Set
// is required by Dagger, so an empty Set is provided here
// Use @JvmSuppressWildcards because otherwise dagger can't inject it (https://stackoverflow.com/a/43149382)
@Provides
@Singleton
fun provideInterceptors(): Set<@JvmSuppressWildcards Interceptor> = emptySet()
}