forked from Automattic/pocket-casts-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proguard-rules.pro
68 lines (55 loc) · 3.39 KB
/
proguard-rules.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Output more information during processing
-verbose
# Make sure that the class loading doesn't fail if the file system is case-insesitive
-dontusemixedcaseclassnames
# Preserve some attributes that may be required for reflection
-keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod
# Assume isInEditMode() always return false in release builds so they can be pruned
-assumevalues public class * extends android.view.View {
boolean isInEditMode() return false;
}
# Ensure the custom, fast service loader implementation is removed. R8 will fold these for us
-assumenosideeffects class kotlinx.coroutines.internal.MainDispatcherLoader {
boolean FAST_SERVICE_LOADER_ENABLED return false;
}
-assumenosideeffects class kotlinx.coroutines.internal.FastServiceLoader {
boolean ANDROID_DETECTED return true;
}
-checkdiscard class kotlinx.coroutines.internal.FastServiceLoader
# Protocol Buffers - keep the field names
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
# https://github.com/google/dagger/issues/4323
-keepclasseswithmembers,includedescriptorclasses class * {
@dagger.internal.KeepFieldType <fields>;
}
# https://github.com/square/retrofit/issues/4134
-if interface *
-keepclasseswithmembers,allowobfuscation interface <1> {
@retrofit2.http.* <methods>;
}
# Do not optimize PlaybackService class.
# It causes na issue where the media notification is not displayed in some cases.
# https://github.com/shiftyjelly/pocketcasts-android/issues/1656
# https://github.com/shiftyjelly/pocketcasts-android/pulls/2921
-keep,allowobfuscation,allowshrinking class au.com.shiftyjelly.pocketcasts.repositories.playback.PlaybackService { *; }
#
# ██ ███████ ██████ █████ ██████ ██ ██ ██████ ██████ ███ ██ ███████ ██ ██████
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██
# ██ █████ ██ ███ ███████ ██ ████ ██ ██ ██ ██ ██ ██ █████ ██ ██ ███
# ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
# ███████ ███████ ██████ ██ ██ ██████ ██ ██████ ██████ ██ ████ ██ ██ ██████
#
# Configuration under this block is a legacy config that needs to be properly tested before removing.
# If you work on any of the entries please move them above and add an appropriate comment on what they do and why do we keep them.
# No explanation was provided for this rule
-keep public class android.support.v4.media.session.** { *; }
# Requested by Adam for MediaCompat and Android Auto
-keep class android.support.v4.media.** implements android.os.Parcelable {
public static final ** CREATOR;
}
# Chrome cast
-keep class androidx.media3.cast.DefaultCastOptionsProvider { *; }
-keep class androidx.mediarouter.app.MediaRouteActionProvider { *; }
-keep class au.com.shiftyjelly.pocketcasts.CastOptionsProvider { *; }
# Keep layout classes
-keep class * extends android.view.View