Skip to content

Commit 79e42d1

Browse files
authored
Add Signer classes to consumer proguard rules (#3310)
This prevents the R8 full-mode optimizer from removing the constructors for these classes since they are instantiated via reflection.
1 parent ddd1ba1 commit 79e42d1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

aws-android-sdk-core/consumer-proguard-rules.pro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@
1717
# The SDK has several references of Apache HTTP client
1818
-dontwarn com.amazonaws.http.**
1919
-dontwarn com.amazonaws.metrics.**
20+
21+
# AGP 8 enables R8 full-mode optimization, which will remove constructors of classes that are only
22+
# instantiated via reflection. These classes are instantiated via reflection in the SignerFactory.
23+
-keep class com.amazonaws.auth.AWS4Signer { *; }
24+
-keep class com.amazonaws.auth.QueryStringSigner { *; }
25+
-keep class com.amazonaws.auth.NoOpSigner { *; }

0 commit comments

Comments
 (0)