Add build type params, fix network module structure
This commit is contained in:
@@ -29,6 +29,9 @@ android {
|
||||
)
|
||||
}
|
||||
}
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
@@ -51,6 +54,7 @@ dependencies {
|
||||
implementation(libs.okhttp)
|
||||
implementation(libs.retrofit)
|
||||
|
||||
implementation(project(":core:common"))
|
||||
implementation(project(":core:network"))
|
||||
implementation(project(":core:database"))
|
||||
|
||||
|
||||
@@ -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