Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit f3ee1da

Browse files
author
Langston Smith
authored
proguard changes (#836)
1 parent 6bcb3b5 commit f3ee1da

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

MapboxAndroidDemo/proguard-rules.pro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
-dontnote retrofit2.Platform
44
# Platform used when running on Java 8 VMs. Will not be used at runtime.
55
-dontwarn retrofit2.Platform$Java8
6+
67
# Retain generic type information for use by reflection by converters and adapters.
7-
-keepattributes Signature
8+
-keepattributes *Annotation*,Signature
9+
10+
811
# Retain declared checked exceptions for use by a Proxy instance.
912
-keepattributes Exceptions
1013

@@ -51,9 +54,6 @@
5154
# AutoValue annotations are retained but dependency is compileOnly.
5255
-dontwarn com.google.auto.value.**
5356

54-
# --- Retrofit ---
55-
# Retain generic type information for use by reflection by converters and adapters.
56-
-keepattributes Signature
5757
# Retain service method parameters.
5858
-keepclassmembernames interface * {
5959
@retrofit2.http.* <methods>;
@@ -63,7 +63,7 @@
6363
-dontwarn org.codehaus.mojo.animal_sniffer.*
6464

6565
# GSON
66-
-keep com.google.gson.**
66+
-keep class com.google.gson.** { *; }
6767

6868
# --- OkHttp ---
6969
-dontwarn okhttp3.**

MapboxAndroidWearDemo/proguard-rules.pro

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
# Platform used when running on Java 8 VMs. Will not be used at runtime.
77
-dontwarn retrofit2.Platform$Java8
88
# Retain generic type information for use by reflection by converters and adapters.
9-
-keepattributes Signature
9+
-keepattributes *Annotation*,Signature
10+
1011
# Retain declared checked exceptions for use by a Proxy instance.
1112
-keepattributes Exceptions
1213

@@ -17,6 +18,7 @@
1718

1819
-dontwarn okio.**
1920
-dontwarn okhttp3.**
21+
-keep class retrofit.**
2022
-keep class retrofit.** { *; }
2123
-keepclasseswithmembers class * {
2224
@retrofit.http.* <methods>;
@@ -47,15 +49,27 @@
4749
-dontwarn com.google.auto.value.**
4850

4951
# --- Retrofit ---
50-
# Retain generic type information for use by reflection by converters and adapters.
51-
-keepattributes Signature
5252
# Retain service method parameters.
5353
-keepclassmembernames interface * {
5454
@retrofit2.http.* <methods>;
5555
}
5656
# Ignore annotation used for build tooling.
5757
-dontwarn org.codehaus.mojo.animal_sniffer.*
5858

59+
# GSON
60+
-keep class com.google.gson.** { *; }
61+
62+
63+
# Consumer proguard rules for plugins
64+
65+
-dontwarn com.mapbox.mapboxandroiddemo.examples.plugins.**
66+
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
67+
68+
# MAS data models that will be serialized/deserialized over Gson
69+
-keep class com.mapbox.services.api.directionsmatrix.v1.models.** { *; }
70+
71+
-dontnote com.squareup.**
72+
5973
# --- OkHttp ---
6074
-dontwarn okhttp3.**
6175
-dontwarn okio.**
@@ -76,4 +90,8 @@
7690
# Other Android
7791
-dontnote android.net.http.*
7892
-dontnote org.apache.commons.codec.**
79-
-dontnote org.apache.http.**
93+
-dontnote org.apache.http.**
94+
-dontwarn org.xmlpull.v1.**
95+
-dontnote org.xmlpull.v1.**
96+
-keep class org.xmlpull.** { *; }
97+
-keepclassmembers class org.xmlpull.** { *; }

0 commit comments

Comments
 (0)