mirror of
https://github.com/AdrianKuta/android-challange-adrian-kuta.git
synced 2025-07-01 21:28:00 +02:00
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`.
23 lines
509 B
Plaintext
23 lines
509 B
Plaintext
plugins {
|
|
alias(libs.plugins.flights.android.library)
|
|
alias(libs.plugins.flights.android.library.hilt)
|
|
}
|
|
|
|
android {
|
|
namespace = "dev.adriankuta.flights.model.data.api"
|
|
}
|
|
|
|
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)
|
|
}
|