You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, first of all, I don't know if you're still maintaining this repo, but in case you do, here's a problem I'm facing at the moment.
I was using your adapter class to convert Retrofit's responses into Kotlin Result<T> type, which was working perfectly in debug mode, without R8 enabled. But I'm now trying to build a release version with R8 enabled, and as soon as the response reaches the adapter, I always end up receiving a null value.
I'm guessing some Proguard rules are necessary to make your adapter work, I'm still trying to figure out which rules to add though. I assume it's tied to the reflection part. I'll post here if I manage to find rules that work, otherwise if you have time you can have a look as well.
The text was updated successfully, but these errors were encountered:
Paul-Etienne
changed the title
The adapter always returns null when using R8 minification
The adapter always returns null when using Android's R8 minification
Nov 30, 2023
I've just realized I don't necessarily need this adapter returning Kotlin's Result<T> type. I've just noticed I can simply use Retrofit's Response<T> type thanks to that SO post. I didn't need to change much code in my application and this type is compatible out of the box with Proguard's minification, so I'm just gonna go with that.
I won't spend more time looking for a Proguard rule that would fix this repo's adapter solution. I'll leave the issue open in case somebody really needs to have a Result<T> type and have R8 enabled.
Hello, first of all, I don't know if you're still maintaining this repo, but in case you do, here's a problem I'm facing at the moment.
I was using your adapter class to convert Retrofit's responses into Kotlin
Result<T>
type, which was working perfectly in debug mode, without R8 enabled. But I'm now trying to build a release version with R8 enabled, and as soon as the response reaches the adapter, I always end up receiving anull
value.I'm guessing some Proguard rules are necessary to make your adapter work, I'm still trying to figure out which rules to add though. I assume it's tied to the reflection part. I'll post here if I manage to find rules that work, otherwise if you have time you can have a look as well.
The text was updated successfully, but these errors were encountered: