Checklist
Description
I was using val jwt = JWT(tokenId) to retrieve claims from the tokenId, in the release build of my android studio project, along with R8 enabled. However I've received the following error: java.lang.runtimeexception: missing type parameter.
After adding those three lines of code in the proguard-rules.pro, the error disappeared:
-keep class com.google.gson.reflect.TypeToken
-keep class * extends com.google.gson.reflect.TypeToken
-keep public class * implements java.lang.reflect.Type
I also had to manually add Gson library to my project just to add those rules, since I'm using KotlinX Serialization library.
Is there a way for you to add those rules for Gson, when using R8, so that we don't have to?
Reproduction
- Enable R8
- Retrieve claims from a tokenId with
val jwt = JWT(tokenId)
Additional context
No response
JWTDecode.Android version
2.0.2
Android version(s)
33
Checklist
Description
I was using
val jwt = JWT(tokenId)to retrieve claims from the tokenId, in the release build of my android studio project, along with R8 enabled. However I've received the following error:java.lang.runtimeexception: missing type parameter.After adding those three lines of code in the
proguard-rules.pro, the error disappeared:I also had to manually add Gson library to my project just to add those rules, since I'm using KotlinX Serialization library.
Is there a way for you to add those rules for Gson, when using R8, so that we don't have to?
Reproduction
val jwt = JWT(tokenId)Additional context
No response
JWTDecode.Android version
2.0.2
Android version(s)
33