Add change base url
This commit is contained in:
@@ -11,14 +11,18 @@ import javax.inject.Singleton
|
|||||||
@Module
|
@Module
|
||||||
@InstallIn(SingletonComponent::class)
|
@InstallIn(SingletonComponent::class)
|
||||||
object AppConfigModule {
|
object AppConfigModule {
|
||||||
const val BASE_URL = "https://tulsu.ru/schedule/queries/"
|
|
||||||
|
private const val BASE_PROD_URL = "https://tulsu.ru/schedule/queries/"
|
||||||
|
private const val BASE_DEVELOP_URL = "https://tulsu.ru/schedule/queries/"
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
fun provideAppConfig(): AppConfig =
|
fun provideAppConfig(): AppConfig {
|
||||||
AppConfig(
|
val baseUrl = if (BuildConfig.DEBUG) BASE_DEVELOP_URL else BASE_PROD_URL
|
||||||
|
return AppConfig(
|
||||||
isDebug = BuildConfig.DEBUG,
|
isDebug = BuildConfig.DEBUG,
|
||||||
baseUrl = BASE_URL,
|
baseUrl = baseUrl,
|
||||||
networkTimeoutSec = 30L
|
networkTimeoutSec = 30L
|
||||||
)
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user