1+ # region Retrofit
2+ # Retrofit consumer rules are not sufficient for R8 full mode.
3+ # Since Retrofit is delivered with mapbox-java and mapbox-java is not an Android library,
4+ # therefore it can't include consumer proguard rules, we include them here, as this module uses mapbox-java as a transitive dependency
5+ # and this is the base module for all other modules in the NavSDK.
6+ # Rules are copied from https://github.com/square/retrofit/blob/trunk/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro.
7+ -keepattributes Signature, InnerClasses, EnclosingMethod
8+ -keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
9+ -keepattributes AnnotationDefault
10+ -keepclassmembers,allowshrinking,allowobfuscation interface * {
11+ @retrofit2.http.* <methods>;
12+ }
13+ -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
14+ -dontwarn javax.annotation.**
15+ -dontwarn kotlin.Unit
16+ -dontwarn retrofit2.KotlinExtensions
17+ -dontwarn retrofit2.KotlinExtensions$*
18+ -if interface * { @retrofit2.http.* <methods>; }
19+ -keep,allowobfuscation interface <1>
20+ -if interface * { @retrofit2.http.* <methods>; }
21+ -keep,allowobfuscation interface * extends <1>
22+ -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
23+ -if interface * { @retrofit2.http.* public *** *(...); }
24+ -keep,allowoptimization,allowshrinking,allowobfuscation class <3>
25+ -keep,allowobfuscation,allowshrinking class retrofit2.Response
26+ # endregion Retrofit
0 commit comments