|
| 1 | +# RETROFIT https://square.github.io/retrofit/ |
| 2 | +# R8 full mode https://github.com/square/retrofit/issues/3751#issuecomment-1192043644 |
| 3 | +# Keep generic signature of Call, Response (R8 full mode strips signatures from non-kept items). |
| 4 | +-keep,allowobfuscation,allowshrinking interface retrofit2.Call |
| 5 | +-keep,allowobfuscation,allowshrinking class retrofit2.Response |
| 6 | +# Keep classes for NewRelic instrumentation |
| 7 | +# https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps/#proguard-library |
| 8 | +-keep class retrofit2.** { *; } |
| 9 | +-dontwarn retrofit2.** |
| 10 | +# To enable the workaround in the [RetrofitDynamicBaseUrlBinder] |
| 11 | +-keep class retrofit2.Retrofit { *; } |
| 12 | +-keep class okhttp3.HttpUrl { *; } |
| 13 | + |
| 14 | +# With R8 full mode generic signatures are stripped for classes that are not |
| 15 | +# kept. Suspend functions are wrapped in continuations where the type argument |
| 16 | +# is used. |
| 17 | +-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation |
| 18 | + |
| 19 | +# MOSHI https://github.com/square/moshi/tree/master?tab=readme-ov-file#r8--proguard |
| 20 | + |
| 21 | +# OKHTTP https://square.github.io/okhttp/features/r8_proguard/ |
| 22 | +# Keep classes for NewRelic instrumentation |
| 23 | +# https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-proguard-or-dexguard-android-apps/#proguard-library |
| 24 | +-keep class okhttp3.** { *; } |
| 25 | +-dontwarn okhttp3.** |
| 26 | +-dontwarn okio.** |
| 27 | +# To enable the workaround in the [RequestInterceptor] for [NewRelic.addHTTPHeadersTrackingFor] |
| 28 | +-keep class okhttp3.Headers { *; } |
| 29 | + |
| 30 | +# Moshi's models https://medium.com/androiddevelopers/practical-proguard-rules-examples-5640a3907dc9 |
| 31 | +-keep class co.nimblehq.sample.compose.data.remote.models.requests.** { *; } |
| 32 | +-keep class co.nimblehq.sample.compose.data.remote.models.responses.** { *; } |
0 commit comments