mirror of
https://github.com/AdrianKuta/android-challange-adrian-kuta.git
synced 2025-07-02 00:08:01 +02:00
This commit introduces a new "Stations" screen that displays airports grouped by country. Key changes: - Added a new Gradle module: `ui:stations`. - Created `StationsScreen.kt` to display a list of airports grouped by country using `LazyColumn`. Airports within each country are displayed as `AirportInfoItem` and countries as `CountryItem`. - Implemented `StationsScreenViewModel.kt` to fetch and manage the state of airports grouped by country. It uses `ObserveAirportsGroupedByCountry` use case. - Defined `ObserveAirportsGroupedByCountry.kt` use case in `domain:stations` module to provide a flow of airports grouped by country. - Implemented `ObserveAirportsGroupedByCountryImpl.kt` in the repository layer, which fetches data using `AirportService`, stores it in `AirportsDatasource`, and maps it to the domain model. - Added Hilt module `ObserveAirportsGroupedByCountryModule.kt` to provide the use case implementation. - Added `stationsScreen()` and `navigateToStations()` to `FlightsNavGraph.kt` and `TopLevelDestination.kt` for navigation. - Updated `settings.gradle.kts` and `app/build.gradle.kts` to include the new `ui:stations` and `domain:stations` modules. - Updated `CacheObservers.kt` to make `mapToDomain` a suspend function. - Added string resources for the stations screen title.
70 lines
2.0 KiB
Plaintext
70 lines
2.0 KiB
Plaintext
plugins {
|
|
alias(libs.plugins.flights.android.application.compose)
|
|
alias(libs.plugins.flights.android.application.hilt)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
}
|
|
|
|
android {
|
|
namespace = "dev.adriankuta.flights"
|
|
|
|
defaultConfig {
|
|
applicationId = "dev.adriankuta.flights"
|
|
versionCode = 10
|
|
versionName = "0.0.1-${versionCode}"
|
|
//signingConfig = signingConfigs.getByName("debug")
|
|
}
|
|
|
|
/*val keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
val keystoreProperties = Properties()
|
|
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
keyAlias = keystoreProperties["keyAlias"] as String
|
|
keyPassword = keystoreProperties["keyPassword"] as String
|
|
storeFile = file(keystoreProperties["storeFile"] as String)
|
|
storePassword = keystoreProperties["storePassword"] as String
|
|
}
|
|
}*/
|
|
|
|
buildTypes {
|
|
debug {
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
isDebuggable = true
|
|
}
|
|
release {
|
|
//signingConfig = signingConfigs.getByName("release")
|
|
isDebuggable = true
|
|
isMinifyEnabled = false
|
|
isShrinkResources = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro",
|
|
)
|
|
}
|
|
}
|
|
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
|
|
implementation(projects.model.repository)
|
|
implementation(projects.model.data.room)
|
|
implementation(projects.model.data.simple)
|
|
|
|
implementation(projects.ui.designsystem)
|
|
implementation(projects.ui.home)
|
|
implementation(projects.ui.stations)
|
|
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.core.splashscreen)
|
|
implementation(libs.androidx.hilt.navigation.compose)
|
|
implementation(libs.app.update.ktx)
|
|
}
|