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