Моя версия Java — 17, Моя ретро-версия —
Код: Выделить всё
com.squareup.retrofit2:retrofit:2.6.0
com.squareup.retrofit2:converter-gson:2.5.0
com.squareup.okhttp3:logging-interceptor:3.12.0
Код: Выделить всё
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName ;
}
-dontwarn retrofit2.**
-dontwarn org.codehaus.mojo.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepattributes *Annotation*
-keepattributes RuntimeVisibleAnnotations
-keepattributes RuntimeInvisibleAnnotations
-keepattributes RuntimeVisibleParameterAnnotations
-keepattributes RuntimeInvisibleParameterAnnotations
-keepattributes EnclosingMethod
-keepclasseswithmembers class * {
@retrofit2.* ;
}
-keepclasseswithmembers interface * {
@retrofit2.* ;
}
Код: Выделить всё
interface ApiService {
@POST("/ipay-decode/")
suspend fun handleDataTest(
@Body requestBody: BaseRequest,
): BaseResponse
}
data class BaseRequest(
@SerializedName("encrypted")
val encrypted: String
)
open class BaseResponse {
@SerializedName("message")
var message: String = ""
}
Подробнее здесь: https://stackoverflow.com/questions/781 ... abled-true