Add build type params, fix network module structure
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package ru.fincode.tsudesk.di
|
||||
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import ru.fincode.tsudesk.BuildConfig
|
||||
import ru.fincode.tsudesk.core.common.config.AppConfig
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
object AppConfigModule {
|
||||
const val BASE_URL = "https://tulsu.ru/schedule/queries/"
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideAppConfig(): AppConfig =
|
||||
AppConfig(
|
||||
isDebug = BuildConfig.DEBUG,
|
||||
baseUrl = BASE_URL,
|
||||
networkTimeoutSec = 30L
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user