Impl base app navigation
This commit is contained in:
@@ -29,11 +29,6 @@ android {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures {
|
|
||||||
buildConfig = true
|
|
||||||
}
|
|
||||||
|
|
||||||
val jvm = JavaVersion.toVersion(libs.versions.jvmTarget.get())
|
val jvm = JavaVersion.toVersion(libs.versions.jvmTarget.get())
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility = jvm
|
sourceCompatibility = jvm
|
||||||
@@ -42,6 +37,10 @@ android {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = jvm.toString()
|
jvmTarget = jvm.toString()
|
||||||
}
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
compose = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
kapt {
|
kapt {
|
||||||
correctErrorTypes = true
|
correctErrorTypes = true
|
||||||
@@ -52,20 +51,29 @@ dependencies {
|
|||||||
implementation(libs.androidx.activity)
|
implementation(libs.androidx.activity)
|
||||||
implementation(libs.androidx.constraintlayout)
|
implementation(libs.androidx.constraintlayout)
|
||||||
|
|
||||||
|
// Compose
|
||||||
|
implementation(platform(libs.compose.bom))
|
||||||
|
implementation(libs.compose.runtime)
|
||||||
|
implementation(libs.compose.ui)
|
||||||
|
implementation(libs.compose.foundation)
|
||||||
|
implementation(libs.compose.material3)
|
||||||
|
// Navigation Compose
|
||||||
|
implementation(libs.androidx.navigation.compose)
|
||||||
|
implementation(libs.androidx.navigation.common)
|
||||||
|
|
||||||
kapt(libs.hilt.compiler)
|
kapt(libs.hilt.compiler)
|
||||||
implementation(libs.hilt.android)
|
implementation(libs.hilt.android)
|
||||||
|
|
||||||
implementation(libs.okhttp)
|
implementation(libs.okhttp)
|
||||||
implementation(libs.retrofit)
|
implementation(libs.retrofit)
|
||||||
|
|
||||||
implementation(project(":core:common"))
|
implementation(projects.core.common)
|
||||||
implementation(project(":core:network"))
|
implementation(projects.core.config)
|
||||||
implementation(project(":core:database"))
|
implementation(projects.core.navigation)
|
||||||
implementation(project(":core:config"))
|
implementation(projects.core.ui)
|
||||||
|
|
||||||
implementation(project(":feature:splash"))
|
|
||||||
implementation(project(":feature:schedule"))
|
|
||||||
implementation(project(":feature:progress"))
|
|
||||||
implementation(project(":feature:news"))
|
|
||||||
|
|
||||||
|
implementation(projects.feature.splash)
|
||||||
|
implementation(projects.feature.schedule)
|
||||||
|
implementation(projects.feature.progress)
|
||||||
|
implementation(projects.feature.news)
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".TSUDeskApp"
|
android:name=".App"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
|||||||
13
app/src/main/java/ru/fincode/tsudesk/App.kt
Normal file
13
app/src/main/java/ru/fincode/tsudesk/App.kt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package ru.fincode.tsudesk
|
||||||
|
|
||||||
|
import android.app.Application
|
||||||
|
import dagger.hilt.android.HiltAndroidApp
|
||||||
|
|
||||||
|
const val LOG_DEBUG_TAG = "NETWORK_DEBUG"
|
||||||
|
|
||||||
|
@HiltAndroidApp
|
||||||
|
class App : Application() {
|
||||||
|
override fun onCreate() {
|
||||||
|
super.onCreate()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,40 +1,19 @@
|
|||||||
package ru.fincode.tsudesk
|
package ru.fincode.tsudesk
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Log
|
|
||||||
import androidx.activity.ComponentActivity
|
import androidx.activity.ComponentActivity
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.activity.compose.setContent
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import kotlinx.coroutines.launch
|
import ru.fincode.tsudesk.ui.TSUDeskApp
|
||||||
import ru.fincode.tsudesk.core.common.model.DataResult
|
|
||||||
import ru.fincode.tsudesk.feature.schedule.domain.model.ScheduleType
|
|
||||||
import ru.fincode.tsudesk.feature.schedule.domain.usecase.GetScheduleUseCase
|
|
||||||
import javax.inject.Inject
|
|
||||||
|
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class MainActivity : ComponentActivity() {
|
class MainActivity : ComponentActivity() {
|
||||||
|
|
||||||
@Inject
|
|
||||||
lateinit var getScheduleUseCase: GetScheduleUseCase
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
lifecycleScope.launch {
|
setContent {
|
||||||
getScheduleUseCase(ScheduleType.Group("220631"))
|
TSUDeskApp()
|
||||||
.collect { result ->
|
|
||||||
when (result) {
|
|
||||||
is DataResult.Data -> {
|
|
||||||
val src = if (result.refreshedFromNetwork) "NETWORK" else "CACHE"
|
|
||||||
Log.d(LOG_TAG, "FROM $src: ${result.data}")
|
|
||||||
}
|
|
||||||
|
|
||||||
is DataResult.Error -> {
|
|
||||||
Log.e(LOG_TAG, "ERROR: $result")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
package ru.fincode.tsudesk
|
|
||||||
|
|
||||||
import android.app.Application
|
|
||||||
import dagger.hilt.android.HiltAndroidApp
|
|
||||||
import kotlinx.coroutines.CoroutineScope
|
|
||||||
import kotlinx.coroutines.Dispatchers
|
|
||||||
import kotlinx.coroutines.SupervisorJob
|
|
||||||
|
|
||||||
const val LOG_TAG = "NETWORK_DEBUG"
|
|
||||||
|
|
||||||
@HiltAndroidApp
|
|
||||||
class TSUDeskApp : Application() {
|
|
||||||
|
|
||||||
// private val appScope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
|
|
||||||
|
|
||||||
override fun onCreate() {
|
|
||||||
super.onCreate()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
26
app/src/main/java/ru/fincode/tsudesk/ui/TSUDeskApp.kt
Normal file
26
app/src/main/java/ru/fincode/tsudesk/ui/TSUDeskApp.kt
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
package ru.fincode.tsudesk.ui
|
||||||
|
|
||||||
|
import androidx.compose.foundation.layout.PaddingValues
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.Surface
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.navigation.compose.rememberNavController
|
||||||
|
import ru.fincode.tsudesk.ui.navigation.AppNavHost
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun TSUDeskApp() {
|
||||||
|
val navController = rememberNavController()
|
||||||
|
|
||||||
|
MaterialTheme {
|
||||||
|
Surface(
|
||||||
|
modifier = Modifier,
|
||||||
|
color = MaterialTheme.colorScheme.background
|
||||||
|
) {
|
||||||
|
AppNavHost(
|
||||||
|
navController = navController,
|
||||||
|
contentPadding = PaddingValues()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package ru.fincode.tsudesk.ui.navigation
|
||||||
|
|
||||||
|
import androidx.compose.foundation.layout.PaddingValues
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.navigation.NavHostController
|
||||||
|
import androidx.navigation.compose.NavHost
|
||||||
|
import androidx.navigation.compose.navigation
|
||||||
|
import ru.fincode.tsudesk.core.navigation.AppRoute
|
||||||
|
import ru.fincode.tsudesk.feature.schedule.ui.navigation.scheduleGraph
|
||||||
|
import ru.fincode.tsudesk.feature.splash.ui.navigation.splashGraph
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun AppNavHost(
|
||||||
|
navController: NavHostController,
|
||||||
|
contentPadding: PaddingValues
|
||||||
|
) {
|
||||||
|
NavHost(
|
||||||
|
navController = navController,
|
||||||
|
startDestination = AppRoute.Splash
|
||||||
|
) {
|
||||||
|
splashGraph(navController)
|
||||||
|
|
||||||
|
navigation<AppRoute.Main>(
|
||||||
|
startDestination = AppRoute.Schedule
|
||||||
|
) {
|
||||||
|
scheduleGraph(navController)
|
||||||
|
// newsGraph(navController)
|
||||||
|
// progressGraph(navController)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
|
import com.android.build.api.dsl.LibraryExtension
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.hilt) apply false
|
alias(libs.plugins.hilt) apply false
|
||||||
alias(libs.plugins.kotlin.kapt) apply false
|
alias(libs.plugins.kotlin.kapt) apply false
|
||||||
@@ -6,3 +9,21 @@ plugins {
|
|||||||
alias(libs.plugins.android.application) apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
alias(libs.plugins.android.library) apply false
|
alias(libs.plugins.android.library) apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
subprojects {
|
||||||
|
plugins.withId("com.android.application") {
|
||||||
|
extensions.configure<ApplicationExtension> {
|
||||||
|
composeOptions {
|
||||||
|
kotlinCompilerExtensionVersion = libs.versions.kotlinCompilerExtension.get()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins.withId("com.android.library") {
|
||||||
|
extensions.configure<LibraryExtension> {
|
||||||
|
composeOptions {
|
||||||
|
kotlinCompilerExtensionVersion = libs.versions.kotlinCompilerExtension.get()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ android {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = jvm.toString()
|
jvmTarget = jvm.toString()
|
||||||
}
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ android {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = jvm.toString()
|
jvmTarget = jvm.toString()
|
||||||
}
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
kapt {
|
kapt {
|
||||||
correctErrorTypes = true
|
correctErrorTypes = true
|
||||||
@@ -30,9 +33,8 @@ dependencies {
|
|||||||
kapt(libs.hilt.compiler)
|
kapt(libs.hilt.compiler)
|
||||||
implementation(libs.hilt.android)
|
implementation(libs.hilt.android)
|
||||||
|
|
||||||
// Kotlin Serialization
|
|
||||||
implementation(libs.kotlinx.serialization.json)
|
implementation(libs.kotlinx.serialization.json)
|
||||||
|
|
||||||
implementation(project(":core:network"))
|
implementation(projects.core.network)
|
||||||
implementation(project(":core:common"))
|
implementation(projects.core.common)
|
||||||
}
|
}
|
||||||
@@ -29,6 +29,9 @@ android {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = jvm.toString()
|
jvmTarget = jvm.toString()
|
||||||
}
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
kapt {
|
kapt {
|
||||||
correctErrorTypes = true
|
correctErrorTypes = true
|
||||||
|
|||||||
47
core/navigation/build.gradle.kts
Normal file
47
core/navigation/build.gradle.kts
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
plugins {
|
||||||
|
alias(libs.plugins.android.library)
|
||||||
|
alias(libs.plugins.kotlin.android)
|
||||||
|
alias(libs.plugins.kotlin.serialization)
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "ru.fincode.tsudesk.core.navigation"
|
||||||
|
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||||
|
defaultConfig {
|
||||||
|
minSdk = libs.versions.minSdk.get().toInt()
|
||||||
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val jvm = JavaVersion.toVersion(libs.versions.jvmTarget.get())
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = jvm
|
||||||
|
targetCompatibility = jvm
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = jvm.toString()
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
compose = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
implementation(libs.kotlinx.serialization.json)
|
||||||
|
// Compose
|
||||||
|
implementation(platform(libs.compose.bom))
|
||||||
|
implementation(libs.compose.runtime)
|
||||||
|
// Navigation Compose
|
||||||
|
implementation(libs.androidx.navigation.compose)
|
||||||
|
implementation(libs.androidx.navigation.common)
|
||||||
|
|
||||||
|
implementation(projects.core.ui)
|
||||||
|
}
|
||||||
0
core/navigation/consumer-rules.pro
Normal file
0
core/navigation/consumer-rules.pro
Normal file
21
core/navigation/proguard-rules.pro
vendored
Normal file
21
core/navigation/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package ru.fincode.tsudesk.core.navigation
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
sealed interface AppRoute {
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data object Splash : AppRoute
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Root-граф приложения после сплеша.
|
||||||
|
* Внутри него лежат табы: Schedule/News/Progress.
|
||||||
|
*/
|
||||||
|
@Serializable
|
||||||
|
data object Main : AppRoute
|
||||||
|
|
||||||
|
// Tabs
|
||||||
|
@Serializable
|
||||||
|
data object Schedule : AppRoute
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data object News : AppRoute
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data object Progress : AppRoute
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ScheduleDetails(
|
||||||
|
val lessonId: Long
|
||||||
|
) : AppRoute
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class NewsDetails(
|
||||||
|
val id: String
|
||||||
|
) : AppRoute
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package ru.fincode.tsudesk.core.navigation
|
||||||
|
|
||||||
|
import androidx.navigation.NavBackStackEntry
|
||||||
|
import androidx.navigation.toRoute
|
||||||
|
|
||||||
|
inline fun <reified T : AppRoute> NavBackStackEntry.route(): T = toRoute()
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package ru.fincode.tsudesk.core.navigation
|
||||||
|
|
||||||
|
import androidx.navigation.NavController
|
||||||
|
import androidx.navigation.NavGraph.Companion.findStartDestination
|
||||||
|
import androidx.navigation.NavOptionsBuilder
|
||||||
|
|
||||||
|
|
||||||
|
fun NavController.navigateToTopLevel(destination: TopLevelDestination) {
|
||||||
|
val route = destination.toRoute()
|
||||||
|
navigate(route) {
|
||||||
|
popUpTo(graph.findStartDestination().id) {
|
||||||
|
saveState = true
|
||||||
|
}
|
||||||
|
launchSingleTop = true
|
||||||
|
restoreState = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun NavController.navigateRoute(
|
||||||
|
route: AppRoute,
|
||||||
|
builder: (NavOptionsBuilder.() -> Unit)? = null
|
||||||
|
) {
|
||||||
|
if (builder == null) {
|
||||||
|
navigate(route)
|
||||||
|
} else {
|
||||||
|
navigate(route, builder)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package ru.fincode.tsudesk.core.navigation
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
enum class TopLevelDestination {
|
||||||
|
SCHEDULE,
|
||||||
|
NEWS,
|
||||||
|
PROGRESS
|
||||||
|
}
|
||||||
|
|
||||||
|
fun TopLevelDestination.toRoute(): AppRoute = when (this) {
|
||||||
|
TopLevelDestination.SCHEDULE -> AppRoute.Schedule
|
||||||
|
TopLevelDestination.NEWS -> AppRoute.News
|
||||||
|
TopLevelDestination.PROGRESS -> AppRoute.Progress
|
||||||
|
}
|
||||||
|
|
||||||
|
val TOP_LEVEL_DESTINATIONS: List<TopLevelDestination> = listOf(
|
||||||
|
TopLevelDestination.SCHEDULE,
|
||||||
|
TopLevelDestination.NEWS,
|
||||||
|
TopLevelDestination.PROGRESS
|
||||||
|
)
|
||||||
@@ -13,9 +13,6 @@ android {
|
|||||||
minSdk = libs.versions.minSdk.get().toInt()
|
minSdk = libs.versions.minSdk.get().toInt()
|
||||||
consumerProguardFiles("consumer-rules.pro")
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
}
|
}
|
||||||
buildFeatures {
|
|
||||||
buildConfig = true
|
|
||||||
}
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
isMinifyEnabled = false
|
isMinifyEnabled = false
|
||||||
@@ -33,6 +30,9 @@ android {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = jvm.toString()
|
jvmTarget = jvm.toString()
|
||||||
}
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
kapt {
|
kapt {
|
||||||
correctErrorTypes = true
|
correctErrorTypes = true
|
||||||
@@ -51,5 +51,5 @@ dependencies {
|
|||||||
api(libs.moshiKotlin)
|
api(libs.moshiKotlin)
|
||||||
api(libs.retrofitMoshi)
|
api(libs.retrofitMoshi)
|
||||||
|
|
||||||
implementation(project(":core:common"))
|
implementation(projects.core.common)
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@ import okhttp3.Response
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
||||||
|
|
||||||
private const val TAG = "NETWORK_DEBUG"
|
private const val LOG_DEBUG_TAG = "LOG_DEBUG_TAG"
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class DebugInterceptor @Inject constructor() : Interceptor {
|
class DebugInterceptor @Inject constructor() : Interceptor {
|
||||||
@@ -14,8 +14,8 @@ class DebugInterceptor @Inject constructor() : Interceptor {
|
|||||||
override fun intercept(chain: Interceptor.Chain): Response {
|
override fun intercept(chain: Interceptor.Chain): Response {
|
||||||
val request = chain.request()
|
val request = chain.request()
|
||||||
|
|
||||||
Log.d(TAG, "URL: ${request.url}")
|
Log.d(LOG_DEBUG_TAG, "URL: ${request.url}")
|
||||||
Log.d(TAG, "Method: ${request.method}")
|
Log.d(LOG_DEBUG_TAG, "Method: ${request.method}")
|
||||||
|
|
||||||
return chain.proceed(request)
|
return chain.proceed(request)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,15 +6,15 @@ import okhttp3.EventListener
|
|||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.net.InetAddress
|
import java.net.InetAddress
|
||||||
|
|
||||||
private const val LOG_TAG = "NETWORK_DEBUG"
|
private const val LOG_DEBUG_TAG = "LOG_DEBUG_TAG"
|
||||||
|
|
||||||
class NetEventLogger : EventListener() {
|
class NetEventLogger : EventListener() {
|
||||||
override fun dnsStart(call: Call, domainName: String) {
|
override fun dnsStart(call: Call, domainName: String) {
|
||||||
Log.d(LOG_TAG, "dnsStart: $domainName")
|
Log.d(LOG_DEBUG_TAG, "dnsStart: $domainName")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun dnsEnd(call: Call, domainName: String, inetAddressList: List<InetAddress>) {
|
override fun dnsEnd(call: Call, domainName: String, inetAddressList: List<InetAddress>) {
|
||||||
Log.d(LOG_TAG, "dnsEnd: $domainName -> $inetAddressList")
|
Log.d(LOG_DEBUG_TAG, "dnsEnd: $domainName -> $inetAddressList")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun connectStart(
|
override fun connectStart(
|
||||||
@@ -22,30 +22,30 @@ class NetEventLogger : EventListener() {
|
|||||||
inetSocketAddress: java.net.InetSocketAddress,
|
inetSocketAddress: java.net.InetSocketAddress,
|
||||||
proxy: java.net.Proxy
|
proxy: java.net.Proxy
|
||||||
) {
|
) {
|
||||||
Log.d(LOG_TAG, "connectStart: $inetSocketAddress proxy=$proxy")
|
Log.d(LOG_DEBUG_TAG, "connectStart: $inetSocketAddress proxy=$proxy")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun secureConnectStart(call: Call) {
|
override fun secureConnectStart(call: Call) {
|
||||||
Log.d(LOG_TAG, "tlsStart")
|
Log.d(LOG_DEBUG_TAG, "tlsStart")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun secureConnectEnd(call: Call, handshake: okhttp3.Handshake?) {
|
override fun secureConnectEnd(call: Call, handshake: okhttp3.Handshake?) {
|
||||||
Log.d(LOG_TAG, "tlsEnd: $handshake")
|
Log.d(LOG_DEBUG_TAG, "tlsEnd: $handshake")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun requestHeadersStart(call: Call) {
|
override fun requestHeadersStart(call: Call) {
|
||||||
Log.d(LOG_TAG, "reqHeadersStart")
|
Log.d(LOG_DEBUG_TAG, "reqHeadersStart")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun responseHeadersStart(call: Call) {
|
override fun responseHeadersStart(call: Call) {
|
||||||
Log.d(LOG_TAG, "respHeadersStart")
|
Log.d(LOG_DEBUG_TAG, "respHeadersStart")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun callFailed(call: Call, ioe: IOException) {
|
override fun callFailed(call: Call, ioe: IOException) {
|
||||||
Log.e(LOG_TAG, "callFailed", ioe)
|
Log.e(LOG_DEBUG_TAG, "callFailed", ioe)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun callEnd(call: Call) {
|
override fun callEnd(call: Call) {
|
||||||
Log.d(LOG_TAG, "callEnd")
|
Log.d(LOG_DEBUG_TAG, "callEnd")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ android {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = jvm.toString()
|
jvmTarget = jvm.toString()
|
||||||
}
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.core.ktx)
|
implementation(libs.core.ktx)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.core.ktx)
|
|
||||||
implementation(libs.androidx.appcompat)
|
implementation(libs.androidx.appcompat)
|
||||||
implementation(libs.material)
|
implementation(libs.material)
|
||||||
|
implementation(libs.core.ktx)
|
||||||
}
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
</manifest>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
</manifest>
|
|
||||||
@@ -32,6 +32,10 @@ android {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = jvm.toString()
|
jvmTarget = jvm.toString()
|
||||||
}
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
compose = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
kapt {
|
kapt {
|
||||||
correctErrorTypes = true
|
correctErrorTypes = true
|
||||||
@@ -40,10 +44,25 @@ dependencies {
|
|||||||
implementation(libs.androidx.appcompat)
|
implementation(libs.androidx.appcompat)
|
||||||
implementation(libs.material)
|
implementation(libs.material)
|
||||||
|
|
||||||
|
// Compose
|
||||||
|
implementation(platform(libs.compose.bom))
|
||||||
|
implementation(libs.compose.runtime)
|
||||||
|
implementation(libs.compose.ui)
|
||||||
|
implementation(libs.compose.foundation)
|
||||||
|
implementation(libs.compose.material3)
|
||||||
|
|
||||||
|
// Navigation Compose
|
||||||
|
implementation(libs.androidx.navigation.compose)
|
||||||
|
implementation(libs.androidx.navigation.common)
|
||||||
|
|
||||||
kapt(libs.hilt.compiler)
|
kapt(libs.hilt.compiler)
|
||||||
implementation(libs.hilt.android)
|
implementation(libs.hilt.android)
|
||||||
|
implementation(libs.hilt.navigation.compose)
|
||||||
|
|
||||||
implementation(project(":core:network"))
|
implementation(projects.core.network)
|
||||||
implementation(project(":core:database"))
|
implementation(projects.core.database)
|
||||||
implementation(project(":core:common"))
|
implementation(projects.core.common)
|
||||||
|
implementation(projects.core.config)
|
||||||
|
implementation(projects.core.ui)
|
||||||
|
implementation(projects.core.navigation)
|
||||||
}
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
</manifest>
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package ru.fincode.tsudesk.feature.schedule.presentation.ui
|
||||||
|
|
||||||
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Alignment
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun ScheduleScreen() {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier.fillMaxSize(),
|
||||||
|
contentAlignment = Alignment.Center
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
text = "Schedule",
|
||||||
|
color = Color.Black
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package ru.fincode.tsudesk.feature.schedule.ui.navigation
|
||||||
|
|
||||||
|
import androidx.navigation.NavGraphBuilder
|
||||||
|
import androidx.navigation.NavHostController
|
||||||
|
import androidx.navigation.compose.composable
|
||||||
|
import ru.fincode.tsudesk.core.navigation.AppRoute
|
||||||
|
import ru.fincode.tsudesk.feature.schedule.presentation.ui.ScheduleScreen
|
||||||
|
|
||||||
|
fun NavGraphBuilder.scheduleGraph(
|
||||||
|
navController: NavHostController
|
||||||
|
) {
|
||||||
|
composable<AppRoute.Schedule> {
|
||||||
|
ScheduleScreen()
|
||||||
|
}
|
||||||
|
|
||||||
|
// регистрация экрана детальной информации о занятии
|
||||||
|
// composable<AppRoute.ScheduleDetails> { backStackEntry ->
|
||||||
|
// // val args = backStackEntry.toRoute<AppRoute.ScheduleDetails>()
|
||||||
|
// // ScheduleDetailsRoute(lessonId = args.lessonId)
|
||||||
|
// }
|
||||||
|
}
|
||||||
@@ -8,10 +8,6 @@ plugins {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "ru.fincode.tsudesk.feature.splash"
|
namespace = "ru.fincode.tsudesk.feature.splash"
|
||||||
buildFeatures { compose = true }
|
|
||||||
composeOptions {
|
|
||||||
kotlinCompilerExtensionVersion = libs.versions.kotlinCompilerExtension.get()
|
|
||||||
}
|
|
||||||
compileSdk = libs.versions.compileSdk.get().toInt()
|
compileSdk = libs.versions.compileSdk.get().toInt()
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = libs.versions.minSdk.get().toInt()
|
minSdk = libs.versions.minSdk.get().toInt()
|
||||||
@@ -35,6 +31,10 @@ android {
|
|||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = jvm.toString()
|
jvmTarget = jvm.toString()
|
||||||
}
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
compose = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
kapt {
|
kapt {
|
||||||
correctErrorTypes = true
|
correctErrorTypes = true
|
||||||
@@ -43,17 +43,24 @@ dependencies {
|
|||||||
implementation(libs.androidx.appcompat)
|
implementation(libs.androidx.appcompat)
|
||||||
implementation(libs.material)
|
implementation(libs.material)
|
||||||
|
|
||||||
|
// Compose
|
||||||
implementation(platform(libs.compose.bom))
|
implementation(platform(libs.compose.bom))
|
||||||
|
implementation(libs.compose.runtime)
|
||||||
implementation(libs.compose.ui)
|
implementation(libs.compose.ui)
|
||||||
implementation(libs.compose.foundation)
|
implementation(libs.compose.foundation)
|
||||||
implementation(libs.compose.material3)
|
implementation(libs.compose.material3)
|
||||||
|
|
||||||
|
// Navigation Compose
|
||||||
|
implementation(libs.androidx.navigation.compose)
|
||||||
|
implementation(libs.androidx.navigation.common)
|
||||||
|
|
||||||
kapt(libs.hilt.compiler)
|
kapt(libs.hilt.compiler)
|
||||||
implementation(libs.hilt.android)
|
implementation(libs.hilt.android)
|
||||||
implementation(libs.hilt.navigation.compose)
|
implementation(libs.hilt.navigation.compose)
|
||||||
|
|
||||||
implementation(project(":core:network"))
|
implementation(projects.core.network)
|
||||||
implementation(project(":core:common"))
|
implementation(projects.core.common)
|
||||||
implementation(project(":core:config"))
|
implementation(projects.core.config)
|
||||||
implementation(project(":core:ui"))
|
implementation(projects.core.ui)
|
||||||
|
implementation(projects.core.navigation)
|
||||||
}
|
}
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
package ru.fincode.tsudesk.feature.splash
|
|
||||||
|
|
||||||
import androidx.test.platform.app.InstrumentationRegistry
|
|
||||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
|
||||||
|
|
||||||
import org.junit.Test
|
|
||||||
import org.junit.runner.RunWith
|
|
||||||
|
|
||||||
import org.junit.Assert.*
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instrumented test, which will execute on an Android device.
|
|
||||||
*
|
|
||||||
* See [testing documentation](http://d.android.com/tools/testing).
|
|
||||||
*/
|
|
||||||
@RunWith(AndroidJUnit4::class)
|
|
||||||
class ExampleInstrumentedTest {
|
|
||||||
@Test
|
|
||||||
fun useAppContext() {
|
|
||||||
// Context of the app under test.
|
|
||||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
|
||||||
assertEquals("ru.fincode.tsudesk.feature.splash.test", appContext.packageName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
</manifest>
|
|
||||||
@@ -7,15 +7,18 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SplashRoute(
|
fun SplashRoute(
|
||||||
onOpenMain: () -> Unit, vm: SplashViewModel = hiltViewModel()
|
onFinish: () -> Unit,
|
||||||
|
viewModel: SplashViewModel = hiltViewModel()
|
||||||
) {
|
) {
|
||||||
val state = vm.state.collectAsStateWithLifecycle().value
|
val state = viewModel.state.collectAsStateWithLifecycle().value
|
||||||
SplashScreen(state)
|
|
||||||
LaunchedEffect(vm) {
|
LaunchedEffect(Unit) {
|
||||||
vm.effects.collect { effect ->
|
viewModel.effects.collect { effect ->
|
||||||
when (effect) {
|
when (effect) {
|
||||||
SplashEffect.OpenMain -> onOpenMain()
|
SplashEffect.OpenMain -> onFinish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SplashScreen(state = state)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +1,24 @@
|
|||||||
package ru.fincode.tsudesk.feature.splash.ui
|
package ru.fincode.tsudesk.feature.splash.ui
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.material3.CircularProgressIndicator
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.unit.dp
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SplashScreen(state: SplashUiState) {
|
fun SplashScreen(
|
||||||
|
state: SplashUiState
|
||||||
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier.fillMaxSize(),
|
||||||
.fillMaxSize()
|
|
||||||
.background(Color.Black),
|
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
Text(
|
||||||
if (state.isLoading) {
|
text = state.title,
|
||||||
Spacer(Modifier.height(16.dp))
|
color = Color.Black
|
||||||
CircularProgressIndicator()
|
)
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package ru.fincode.tsudesk.feature.splash.ui
|
package ru.fincode.tsudesk.feature.splash.ui
|
||||||
|
|
||||||
data class SplashUiState(
|
data class SplashUiState(
|
||||||
|
val title: String = "TSUDesk",
|
||||||
val isLoading: Boolean = true,
|
val isLoading: Boolean = true,
|
||||||
val errorMessage: String? = null
|
val errorMessage: String? = null
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package ru.fincode.tsudesk.feature.splash.ui.navigation
|
||||||
|
|
||||||
|
import androidx.navigation.NavGraphBuilder
|
||||||
|
import androidx.navigation.NavHostController
|
||||||
|
import androidx.navigation.compose.composable
|
||||||
|
import ru.fincode.tsudesk.core.navigation.AppRoute
|
||||||
|
import ru.fincode.tsudesk.feature.splash.ui.SplashRoute
|
||||||
|
|
||||||
|
fun NavGraphBuilder.splashGraph(
|
||||||
|
navController: NavHostController
|
||||||
|
) {
|
||||||
|
composable<AppRoute.Splash> {
|
||||||
|
SplashRoute(
|
||||||
|
onFinish = {
|
||||||
|
navController.navigate(AppRoute.Main) {
|
||||||
|
popUpTo(AppRoute.Splash) { inclusive = true }
|
||||||
|
launchSingleTop = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package ru.fincode.tsudesk.feature.splash
|
|
||||||
|
|
||||||
import org.junit.Test
|
|
||||||
|
|
||||||
import org.junit.Assert.*
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Example local unit test, which will execute on the development machine (host).
|
|
||||||
*
|
|
||||||
* See [testing documentation](http://d.android.com/tools/testing).
|
|
||||||
*/
|
|
||||||
class ExampleUnitTest {
|
|
||||||
@Test
|
|
||||||
fun addition_isCorrect() {
|
|
||||||
assertEquals(4, 2 + 2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -18,6 +18,7 @@ activity = "1.8.0"
|
|||||||
constraintlayout = "2.1.4"
|
constraintlayout = "2.1.4"
|
||||||
compose-bom = "2024.10.00"
|
compose-bom = "2024.10.00"
|
||||||
hilt-nav-compose = "1.2.0"
|
hilt-nav-compose = "1.2.0"
|
||||||
|
navigation = "2.8.5"
|
||||||
|
|
||||||
hilt = "2.50"
|
hilt = "2.50"
|
||||||
retrofit = "2.11.0"
|
retrofit = "2.11.0"
|
||||||
@@ -28,9 +29,6 @@ lifecycle = "2.7.0"
|
|||||||
coroutines = "1.8.1"
|
coroutines = "1.8.1"
|
||||||
|
|
||||||
room = "2.6.1"
|
room = "2.6.1"
|
||||||
junit = "4.13.2"
|
|
||||||
junitVersion = "1.1.5"
|
|
||||||
espressoCore = "3.5.1"
|
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
# Android
|
# Android
|
||||||
@@ -42,12 +40,15 @@ kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-
|
|||||||
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||||
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
||||||
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
|
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
|
||||||
compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
|
|
||||||
hilt-navigation-compose = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "hilt-nav-compose" }
|
|
||||||
# Compose UI
|
# Compose UI
|
||||||
compose-ui = { group = "androidx.compose.ui", name = "ui" }
|
compose-ui = { group = "androidx.compose.ui", name = "ui" }
|
||||||
compose-foundation = { group = "androidx.compose.foundation", name = "foundation" }
|
compose-foundation = { group = "androidx.compose.foundation", name = "foundation" }
|
||||||
compose-material3 = { group = "androidx.compose.material3", name = "material3" }
|
compose-material3 = { group = "androidx.compose.material3", name = "material3" }
|
||||||
|
hilt-navigation-compose = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "hilt-nav-compose" }
|
||||||
|
androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigation" }
|
||||||
|
androidx-navigation-common = { group = "androidx.navigation", name = "navigation-common-ktx", version.ref = "navigation" }
|
||||||
|
compose-runtime = { group = "androidx.compose.runtime", name = "runtime" }
|
||||||
|
compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
|
||||||
# Network: okhhtp3+retrofit2
|
# Network: okhhtp3+retrofit2
|
||||||
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
|
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
|
||||||
okhttp-logging = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" }
|
okhttp-logging = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" }
|
||||||
@@ -65,9 +66,6 @@ core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx"
|
|||||||
room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "room" }
|
room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "room" }
|
||||||
room-ktx = { group = "androidx.room", name = "room-ktx", version.ref = "room" }
|
room-ktx = { group = "androidx.room", name = "room-ktx", version.ref = "room" }
|
||||||
room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
|
room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
|
||||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
|
||||||
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
|
||||||
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
|
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
|
||||||
|
|||||||
@@ -18,13 +18,14 @@ dependencyResolutionManagement {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||||
|
|
||||||
rootProject.name = "TSUDesk"
|
rootProject.name = "TSUDesk"
|
||||||
include(":app")
|
include(":app")
|
||||||
|
|
||||||
include(":core:common")
|
include(":core:common")
|
||||||
include(":core:ui")
|
include(":core:ui")
|
||||||
|
include(":core:navigation")
|
||||||
include(":core:network")
|
include(":core:network")
|
||||||
include(":core:database")
|
include(":core:database")
|
||||||
include(":core:config")
|
include(":core:config")
|
||||||
|
|||||||
Reference in New Issue
Block a user