mirror of
https://github.com/AdrianKuta/android-challange-adrian-kuta.git
synced 2025-07-01 15:17:59 +02:00
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`.
30 lines
1.2 KiB
Kotlin
30 lines
1.2 KiB
Kotlin
package dev.adriankuta.flights
|
|
|
|
import com.android.build.api.dsl.CommonExtension
|
|
import org.gradle.api.Project
|
|
|
|
internal fun Project.configureAndroidLint(
|
|
commonExtension: CommonExtension<*, *, *, *, *, *>,
|
|
) {
|
|
commonExtension.apply {
|
|
lint {
|
|
baseline = file("lint-baseline.xml")
|
|
warningsAsErrors = true
|
|
disable += "AndroidGradlePluginVersion"
|
|
warning += "LintBaseline" // Still have report remind us of baseline issues
|
|
disable += "GradleDependency" // We want to mange dependency updates in own PRs.
|
|
disable += "MissingTranslation" // Translations are apart from our normal process at the moment
|
|
|
|
// region - Bug in lint/AGP apparently
|
|
// TODO Maybe it is, maybe it isnt. Its a transitory, hard to replicate bug. Ideally
|
|
// we want these lint rules applied.
|
|
disable += "StateFlowValueCalledInComposition"
|
|
disable += "FlowOperatorInvokedInComposition"
|
|
disable += "WrongNavigateRouteType"
|
|
disable += "WrongStartDestinationType"
|
|
disable += "UnknownIssueId"
|
|
// endregion
|
|
}
|
|
}
|
|
}
|