mirror of
https://github.com/AdrianKuta/android-challange-adrian-kuta.git
synced 2025-07-03 08:47:58 +02:00
Refactor: Format code and update lint baselines
This commit applies code formatting changes across multiple files and updates lint baseline files. Key changes: - Added trailing commas to data classes in the `domain/types` module and related files. - Formatted `HomeScreenViewModel.kt`, `Result.kt`, `ObserveAirportsUseCase.kt`, `AirportService.kt`, `ObserveAirportsUseCaseModule.kt`, `AirportInfoDomainMapper.kt`, `AirportInfoModelMapper.kt`, `AirportsDatasourceModule.kt`, `AirportsDatasourceImpl.kt`, `FlightService.kt`, `Cache.kt`, and `CacheImpl.kt`. - Updated `README.md` and `LICENCE.md` with minor formatting adjustments. - Updated various `lint-baseline.xml` files due to changes in cached dependencies or formatting. - Added new `lint-baseline.xml` files for `model/datasource/airports`, `model/datasource/shared`, `domain/search`, and `model/data/api`. - Removed unused imports from `app/build.gradle.kts`. - Reformatted XML files: `ic_launcher_round.xml`, `ic_launcher.xml`, `strings.xml`, `ic_launcher_background.xml`. - Added project code style configuration files: `.idea/codeStyles/codeStyleConfig.xml` and `.idea/codeStyles/Project.xml`. - Reformatted `characters.json`. - Updated response data classes in `model/data/api/entities` with trailing commas and minor formatting.
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
id="Aligned16KB"
|
||||
message="The native library `arm64-v8a/libmockkjvmtiagent.so` (from `io.mockk:mockk-agent-android:1.14.2`) is not 16 KB aligned">
|
||||
<location
|
||||
file="$GRADLE_USER_HOME/caches/8.11.1/transforms/9ee3fe20033b4dd897c7dfcf7c303d16/transformed/mockk-agent-android-1.14.2/jni/arm64-v8a/libmockkjvmtiagent.so"/>
|
||||
file="$GRADLE_USER_HOME/caches/8.11.1/transforms/78a476c196dc0b141a854b3fe010ce3f/transformed/mockk-agent-android-1.14.2/jni/arm64-v8a/libmockkjvmtiagent.so"/>
|
||||
</issue>
|
||||
|
||||
</issues>
|
||||
|
@ -2,56 +2,77 @@
|
||||
"data": [
|
||||
{
|
||||
"name": "Adam Małysz"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Harry Potter"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "SpongeBob"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Miś uszatek"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Brzydkie kaczątko"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Papa Smerf"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Smerfetka"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Gargamel",
|
||||
"category": "Smerfy"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Ważniak",
|
||||
"category": "Smerfy"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Roszpunka"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Myszka Miki"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Król Lew"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Elsa",
|
||||
"category": "Kraina lodu"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Olaf",
|
||||
"category": "Kraina lodu"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Mała syrenka"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Kubuś Puchatek"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Prosiaczek",
|
||||
"category": "Kubuś Puchatek"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Kłapouchy",
|
||||
"category": "Kubuś Puchatek"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Królik",
|
||||
"category": "Kubuś Puchatek"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Maleństwo",
|
||||
"category": "Kubuś Puchatek"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Pan Sowa",
|
||||
"category": "Kubuś Puchatek"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"name": "Krzyś",
|
||||
"category": "Kubuś Puchatek"
|
||||
}
|
||||
|
@ -18,11 +18,11 @@ internal class AirportsDatasourceImpl : AirportsDatasource {
|
||||
|
||||
override suspend fun setAirportsInfo(
|
||||
airports: List<AirportResponse>,
|
||||
cacheKey: String
|
||||
cacheKey: String,
|
||||
) {
|
||||
_airports.value = CacheImpl(
|
||||
cacheKey = cacheKey,
|
||||
data = airports.map { it.toModel() }
|
||||
data = airports.map { it.toModel() },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -27,4 +27,4 @@ internal class AirportsDatasourceImplModule {
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provide(): AirportsDatasourceImpl = AirportsDatasourceImpl()
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ internal fun AirportResponse.toModel(): AirportInfoModel {
|
||||
countryName = country?.name.orEmpty(),
|
||||
countryCurrencyCode = country?.currencyCode.orEmpty(),
|
||||
latitude = coordinates?.latitude ?: 0.0,
|
||||
longitude = coordinates?.longitude ?: 0.0
|
||||
longitude = coordinates?.longitude ?: 0.0,
|
||||
)
|
||||
}
|
||||
|
||||
@ -38,5 +38,5 @@ private data class AirportInfoModelImpl(
|
||||
override val countryName: String,
|
||||
override val countryCurrencyCode: String,
|
||||
override val latitude: Double,
|
||||
override val longitude: Double
|
||||
override val longitude: Double,
|
||||
) : AirportInfoModel
|
||||
|
Reference in New Issue
Block a user