Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Commit 84dd07a

Browse files
committed
- Add butterknife-8 and dart
- Update gson, parceler, okhttp3, okio, retrofit2 and viewpagerindicator
1 parent c636c6c commit 84dd07a

8 files changed

+52
-27
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ButterKnife 8
2+
3+
# Retain generated class which implement Unbinder.
4+
-keep public class * implements butterknife.Unbinder { public <init>(...); }
5+
6+
# Prevent obfuscation of types which use ButterKnife annotations since the simple name
7+
# is used to reflectively look up the generated ViewBinding.
8+
-keep class butterknife.*
9+
-keepclasseswithmembernames class * { @butterknife.* <methods>; }
10+
-keepclasseswithmembernames class * { @butterknife.* <fields>; }

libraries/proguard-dart.pro

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Dart 2.x
2+
# https://github.com/f2prateek/dart#proguard
3+
4+
-dontwarn com.f2prateek.dart.internal.**
5+
-keep class **$$ExtraInjector { *; }
6+
-keepclasseswithmembernames class * {
7+
@com.f2prateek.dart.* <fields>;
8+
}
9+
10+
#for dart 2.0 only
11+
-keep class **Henson { *; }
12+
-keep class **$$IntentBuilder { *; }
13+

libraries/proguard-gson.pro

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1-
## GSON 2.2.4 specific rules ##
2-
1+
##---------------Begin: proguard configuration for Gson ----------
32
# Gson uses generic type information stored in a class file when working with fields. Proguard
43
# removes such information by default, so configure it to keep all of it.
54
-keepattributes Signature
65

76
# For using GSON @Expose annotation
87
-keepattributes *Annotation*
98

10-
-keepattributes EnclosingMethod
11-
129
# Gson specific classes
1310
-keep class sun.misc.Unsafe { *; }
14-
-keep class com.google.gson.stream.** { *; }
11+
#-keep class com.google.gson.stream.** { *; }
12+
13+
# Application classes that will be serialized/deserialized over Gson
14+
-keep class com.google.gson.examples.android.model.** { *; }
15+
16+
# Prevent proguard from stripping interface information from TypeAdapterFactory,
17+
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
18+
-keep class * implements com.google.gson.TypeAdapterFactory
19+
-keep class * implements com.google.gson.JsonSerializer
20+
-keep class * implements com.google.gson.JsonDeserializer
21+
22+
##---------------End: proguard configuration for Gson ----------

libraries/proguard-parceler.pro

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Parceler rules
22
# Source: https://github.com/johncarl81/parceler#configuring-proguard
33

4-
-keep class * implements android.os.Parcelable {
5-
public static final android.os.Parcelable$Creator *;
6-
}
7-
8-
-keep class org.parceler.Parceler$$Parcels
4+
-keep interface org.parceler.Parcel
5+
-keep @org.parceler.Parcel class * { *; }
6+
-keep class **$$Parcelable { *; }
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
# OkHttp
2-
-keepattributes Signature
3-
-keepattributes *Annotation*
4-
-keep class okhttp3.** { *; }
5-
-keep interface okhttp3.** { *; }
6-
-dontwarn okhttp3.**
2+
-dontwarn okhttp3.**
3+
-dontwarn javax.annotation.*

libraries/proguard-square-okio.pro

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
# Okio
2-
-keep class sun.misc.Unsafe { *; }
3-
-dontwarn java.nio.file.*
4-
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
5-
-dontwarn okio.**
2+
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# Retrofit 2.X
22
## https://square.github.io/retrofit/ ##
33

4-
-dontwarn retrofit2.**
5-
-keep class retrofit2.** { *; }
6-
-keepattributes Signature
7-
-keepattributes Exceptions
8-
9-
-keepclasseswithmembers class * {
10-
@retrofit2.http.* <methods>;
11-
}
4+
# Platform calls Class.forName on types which do not exist on Android to determine platform.
5+
-dontnote retrofit2.Platform
6+
# Platform used when running on Java 8 VMs. Will not be used at runtime.
7+
-dontwarn retrofit2.Platform$Java8
8+
# Retain generic signatures used for parsing the return types reflectively.
9+
-keepattributes Signature
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#View Pager Indicator
2+
# https://github.com/JakeWharton/ViewPagerIndicator/issues/366#issuecomment-159972837
3+
4+
-dontwarn com.viewpagerindicator.LinePageIndicator

0 commit comments

Comments
 (0)