mirror of
https://github.com/vide/matedroid.git
synced 2026-01-20 00:03:17 +08:00
chore: remove unnecessary moshi-kotlin reflection dependency (#30)
Remove moshi-kotlin (reflection-based adapter) since the project uses KSP code generation with @JsonClass(generateAdapter = true). Benefits: - Smaller APK size (no reflection library) - Faster JSON parsing (generated code vs reflection) - Cleaner dependency tree Note: The Moshi kapt deprecation warning during hiltJavaCompileDebug is a known Hilt bug and will persist until Hilt fixes it or Moshi 2.0 removes kapt support entirely. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -109,7 +109,6 @@ dependencies {
|
||||
implementation(libs.okhttp)
|
||||
implementation(libs.okhttp.logging)
|
||||
implementation(libs.moshi)
|
||||
implementation(libs.moshi.kotlin)
|
||||
ksp(libs.moshi.codegen)
|
||||
|
||||
// DataStore
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.matedroid.data.api.NominatimApi
|
||||
import com.matedroid.data.api.TeslamateApi
|
||||
import com.matedroid.data.local.SettingsDataStore
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
@@ -32,7 +31,6 @@ object NetworkModule {
|
||||
@Singleton
|
||||
fun provideMoshi(): Moshi {
|
||||
return Moshi.Builder()
|
||||
.addLast(KotlinJsonAdapterFactory())
|
||||
.build()
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ retrofit-converter-moshi = { group = "com.squareup.retrofit2", name = "converter
|
||||
okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
|
||||
okhttp-logging = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" }
|
||||
moshi = { group = "com.squareup.moshi", name = "moshi", version.ref = "moshi" }
|
||||
moshi-kotlin = { group = "com.squareup.moshi", name = "moshi-kotlin", version.ref = "moshi" }
|
||||
moshi-codegen = { group = "com.squareup.moshi", name = "moshi-kotlin-codegen", version.ref = "moshi" }
|
||||
|
||||
# DataStore
|
||||
|
||||
Reference in New Issue
Block a user