|
17 | 17 | #} |
18 | 18 |
|
19 | 19 | ##---------------Begin: proguard configuration for Common -------- |
20 | | -# Intentionally blank, left to consumers of common to implement. |
| 20 | +# keep with optmizations and shrinking, but do not obfuscate |
| 21 | +-keep,allowoptimization,allowshrinking class !com.microsoft.identity.common.java.nativeauth.**, !com.microsoft.identity.common.nativeauth.**, com.microsoft.identity.** { *; } |
| 22 | +-keep class * extends com.microsoft.identity.common.java.authorities.Authority { *; } |
| 23 | +-keep class * extends com.microsoft.identity.common.java.authorities.AzureActiveDirectoryAudience { *; } |
| 24 | +-keep class * extends com.microsoft.identity.common.java.cache.ICacheRecord { *; } |
| 25 | +-keep class * extends com.microsoft.identity.common.java.cache.ITokenCacheItem { *; } |
| 26 | +-keep class * extends com.microsoft.identity.common.java.authscheme.AbstractAuthenticationScheme { *; } |
| 27 | +-keep class com.microsoft.identity.common.internal.broker.AuthUxJsonPayload { *; } |
| 28 | + |
| 29 | + |
| 30 | +#For Android Credential Manager: https://developer.android.com/training/sign-in/passkeys#proguard |
| 31 | +-if class androidx.credentials.CredentialManager |
| 32 | +-keep class androidx.credentials.playservices.** { |
| 33 | + *; |
| 34 | +} |
| 35 | + |
| 36 | +# Runtime annotations |
| 37 | +-keep class net.jcip.annotations.GuardedBy |
| 38 | +-keep class net.jcip.annotations.Immutable |
| 39 | +-keep class net.jcip.annotations.ThreadSafe |
| 40 | + |
| 41 | +# Compile time annotations |
| 42 | +-dontwarn edu.umd.cs.findbugs.annotations.NonNull |
| 43 | +-dontwarn edu.umd.cs.findbugs.annotations.Nullable |
| 44 | +-dontwarn edu.umd.cs.findbugs.annotations.SuppressFBWarnings |
| 45 | + |
| 46 | +-keepattributes SourceFile,LineNumberTable |
21 | 47 |
|
22 | 48 | ##---------------Begin: proguard configuration for Nimbus ---------- |
23 | 49 | # Intentionally blank, left to consumers of common to implement. |
|
28 | 54 | ##---------------Begin: proguard configuration for Gson -------- |
29 | 55 | # Gson uses generic type information stored in a class file when working with fields. Proguard |
30 | 56 | # removes such information by default, so configure it to keep all of it. |
31 | | --keepattributes Signature |
| 57 | +-keepattributes Signature,SourceFile,LineNumberTable |
32 | 58 |
|
33 | 59 | # For using GSON @Expose annotation |
34 | 60 | -keepattributes *Annotation* |
|
37 | 63 | -dontwarn sun.misc.** |
38 | 64 | #-keep class com.google.gson.stream.** { *; } |
39 | 65 |
|
40 | | -# Application classes that will be serialized/deserialized over Gson |
41 | | --keep class com.google.gson.examples.android.model.** { <fields>; } |
42 | | - |
43 | 66 | # Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory, |
44 | 67 | # JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter) |
45 | 68 | -keep class * extends com.google.gson.TypeAdapter |
46 | 69 | -keep class * implements com.google.gson.TypeAdapterFactory |
47 | 70 | -keep class * implements com.google.gson.JsonSerializer |
48 | 71 | -keep class * implements com.google.gson.JsonDeserializer |
| 72 | +-keep class com.google.gson.reflect.TypeToken { *; } |
| 73 | +-keep class * extends com.google.gson.reflect.TypeToken { *; } |
49 | 74 |
|
| 75 | +##---------------Begin: proguard configuration for OpenTelemetry -------- |
50 | 76 | # keep everything in this package from being removed or renamed |
51 | 77 | -keep class io.opentelemetry.** { *; } |
52 | 78 |
|
53 | 79 | # Prevent R8 from leaving Data object members always null |
54 | | --keepclassmembers,allowobfuscation class * { |
| 80 | +-keepclassmembers class com.microsoft.identity.** { |
55 | 81 | @com.google.gson.annotations.SerializedName <fields>; |
| 82 | + @com.squareup.moshi.Json <fields>; |
56 | 83 | } |
57 | 84 |
|
58 | | -#For Android Credential Manager: https://developer.android.com/training/sign-in/passkeys#proguard |
59 | | --if class androidx.credentials.CredentialManager |
60 | | --keep class androidx.credentials.playservices.** { |
61 | | - *; |
62 | | -} |
| 85 | +## Other |
| 86 | +# Compile time annotation |
| 87 | +-dontwarn com.google.auto.value.AutoValue$CopyAnnotations |
| 88 | +-dontwarn com.google.auto.value.AutoValue |
| 89 | +-dontwarn com.google.auto.value.extension.memoized.Memoized |
0 commit comments