Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Migrate to sandwich 1.2.4 #56

Merged
merged 1 commit into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/src/main/java/com/skydoves/pokedex/di/NetworkModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package com.skydoves.pokedex.di
import com.skydoves.pokedex.network.HttpRequestInterceptor
import com.skydoves.pokedex.network.PokedexClient
import com.skydoves.pokedex.network.PokedexService
import com.skydoves.sandwich.coroutines.CoroutinesResponseCallAdapterFactory
import com.skydoves.sandwich.adapters.ApiResponseCallAdapterFactory
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down Expand Up @@ -48,7 +48,7 @@ object NetworkModule {
.client(okHttpClient)
.baseUrl("https://pokeapi.co/api/v2/")
.addConverterFactory(MoshiConverterFactory.create())
.addCallAdapterFactory(CoroutinesResponseCallAdapterFactory.create())
.addCallAdapterFactory(ApiResponseCallAdapterFactory.create())
.build()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.skydoves.pokedex.network

import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import com.skydoves.sandwich.coroutines.CoroutinesResponseCallAdapterFactory
import com.skydoves.sandwich.adapters.ApiResponseCallAdapterFactory
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import okio.buffer
Expand Down Expand Up @@ -74,7 +74,7 @@ abstract class ApiAbstract<T> {
return Retrofit.Builder()
.baseUrl(mockWebServer.url("/"))
.addConverterFactory(MoshiConverterFactory.create())
.addCallAdapterFactory(CoroutinesResponseCallAdapterFactory.create())
.addCallAdapterFactory(ApiResponseCallAdapterFactory.create())
.build()
.create(clazz)
}
Expand Down