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.
This commit refactors the package structure for Gradle convention plugins and introduces bottom navigation to the application.
Key changes:
- Moved Gradle convention plugin files from `dev.adriankuta.partymania` to `dev.adriankuta.flights`.
- Added `TopLevelDestination.kt` to define top-level navigation destinations with icons, titles, and routes.
- Implemented `FlightsBottomBar` Composable in `FlightsApp.kt` to display a `NavigationBar` with items for each `TopLevelDestination`.
- Updated `FlightsNavGraph.kt`:
- Renamed from `FlightsNavGraph.kt` to `navigation/FlightsNavGraph.kt`.
- Added `navigateToTopLevelDestination` extension function for `NavController` to handle navigation to top-level destinations with appropriate `NavOptions`.
- Updated `HomeNavigation.kt`:
- Added `navigateToHome` extension function for `NavController`.
- Added `strings.xml` for `ui:home` module with `home_screen_title`.
- Ensured Kotlin serialization plugin is correctly applied in `app/build.gradle.kts`.