fix(android): use retrofit.create<T>() extension in provideLibraryApi
CI hit a KSP/Hilt resolution error on the prior commit: ModuleProcessingStep was unable to process 'NetworkModule' because 'LibraryApi' could not be resolved. Switching from `retrofit.create(LibraryApi::class.java)` to the Kotlin extension `retrofit.create()` (with explicit `LibraryApi` return type annotation). The extension is reified and may sidestep whatever type-resolution path the previous form tripped under KSP2 + Hilt. If this also fails, the next step is to split AlbumWire.kt and ArtistWire.kt so each file has a single top-level declaration — investigating cross-file symbol-resolution order in KSP2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import okhttp3.MediaType.Companion.toMediaType
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.logging.HttpLoggingInterceptor
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.create
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Singleton
|
||||
|
||||
@@ -73,8 +74,7 @@ object NetworkModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideLibraryApi(retrofit: Retrofit): LibraryApi =
|
||||
retrofit.create(LibraryApi::class.java)
|
||||
fun provideLibraryApi(retrofit: Retrofit): LibraryApi = retrofit.create()
|
||||
|
||||
private const val CONNECT_TIMEOUT_SECONDS = 10L
|
||||
private const val READ_TIMEOUT_SECONDS = 30L
|
||||
|
||||
Reference in New Issue
Block a user