mirror of
https://github.com/AdrianKuta/android-challange-adrian-kuta.git
synced 2025-07-02 06:17:59 +02:00
feat: Add Retrofit and Moshi for network operations
This commit introduces Retrofit and Moshi to handle network requests and JSON parsing. Key changes include: - Added Retrofit, Moshi, OkHttp, and OkHttp Logging Interceptor dependencies to `libs.versions.toml` and `model/data/api/build.gradle.kts`. - Created data classes for API responses: `AirportResponse`, `RouteResponse`, and `FlightResponse`. - Defined Retrofit service interfaces: `AirportService`, `RoutesService`, and `FlightService`. - Implemented a Hilt `NetworkModule` to provide Retrofit, Moshi, and OkHttpClient instances. - Added a Detekt configuration file for the `model/data/api` module. - Temporarily commented out `configureFlavors` in `AndroidApplicationConvention.kt` and `ConfigureLibrary.kt`.
This commit is contained in:
@ -10,6 +10,13 @@ android {
|
||||
dependencies {
|
||||
implementation(projects.core.util)
|
||||
|
||||
implementation(platform(libs.okhttp.bom))
|
||||
|
||||
implementation(libs.converter.moshi)
|
||||
implementation(libs.okhttp)
|
||||
implementation(libs.okhttp.logging.interceptor)
|
||||
implementation(libs.retrofit)
|
||||
|
||||
implementation(libs.timber)
|
||||
implementation(libs.gson)
|
||||
}
|
||||
|
Reference in New Issue
Block a user