media3/library/common/proguard-rules.txt
olly 6ef82e4423 Move upstream components to common
Common houses DataSource as an interface for reading data,
but most of the concrete implementations are in ExoPlayer.
This means that in practice, if an app wants to use a module
that reads using DataSource (e.g. extractor), they may be
forced to depend on ExoPlayer as well to get a concrete
implementation (e.g. FileDataSource). This change moves the
DataSource implementations into common to resolve this.

PiperOrigin-RevId: 403222081
2021-10-15 12:37:18 +01:00

34 lines
1.3 KiB
Plaintext

# Proguard rules specific to the common module.
# Constant folding for resource integers may mean that a resource passed to this method appears to be unused. Keep the method to prevent this from happening.
-keepclassmembers class com.google.android.exoplayer2.upstream.RawResourceDataSource {
public static android.net.Uri buildRawResourceUri(int);
}
# Constructors accessed via reflection in DefaultDataSource
-dontnote com.google.android.exoplayer2.ext.rtmp.RtmpDataSource
-keepclassmembers class com.google.android.exoplayer2.ext.rtmp.RtmpDataSource {
<init>();
}
# Don't warn about checkerframework and Kotlin annotations
-dontwarn org.checkerframework.**
-dontwarn kotlin.annotations.jvm.**
-dontwarn javax.annotation.**
# From https://github.com/google/guava/wiki/UsingProGuardWithGuava
-dontwarn java.lang.ClassValue
-dontwarn java.lang.SafeVarargs
-dontwarn javax.lang.model.element.Modifier
-dontwarn sun.misc.Unsafe
# Don't warn about Guava's compile-only dependencies.
# These lines are needed for ProGuard but not R8.
-dontwarn com.google.errorprone.annotations.**
-dontwarn com.google.j2objc.annotations.**
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
# Workaround for https://issuetracker.google.com/issues/112297269
# This is needed for ProGuard but not R8.
-keepclassmembernames class com.google.common.base.Function { *; }