Fix binding set of interceptors twice in release
This commit is contained in:
@@ -1,20 +0,0 @@
|
|||||||
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()
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user