Files
android-challange-adrian-kuta/settings.gradle.kts
Adrian Kuta 3e9768919d feat: Implement stations screen with grouped airports
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.
2025-06-15 23:15:25 +02:00

41 lines
1.2 KiB
Plaintext

pluginManagement {
includeBuild("build-logic")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
// If the issue below gets fixed then the repositories blocks can come out the project modules and this can go back
// to being RepositoriesMode.FAIL_ON_PROJECT_REPOS
// https://github.com/GoogleCloudPlatform/artifact-registry-maven-tools/issues/71
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
gradle.startParameter.excludedTaskNames.addAll(listOf(":build-logic:convention:testClasses"))
rootProject.name = "Flights"
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
include(":app")
include(":core:util")
include(":domain:search")
include(":domain:stations")
include(":domain:types")
include(":model:data:api")
include(":model:data:room")
include(":model:data:shared")
include(":model:data:simple")
include(":model:datasource:airports")
include(":model:datasource:shared")
include(":model:repository")
include(":ui:designsystem")
include(":ui:home")
include(":ui:sharedui")
include(":ui:stations")