From 3e36ebe28e092c82b16f894b081f3bc32bd43a81 Mon Sep 17 00:00:00 2001 From: ibaker Date: Thu, 17 Sep 2020 12:08:47 +0100 Subject: [PATCH] Suppress Guava-related ProGuard/R8 warnings I didn't copy-paste the whole of https://github.com/google/guava/wiki/UsingProGuardWithGuava because this line seems relevant based on our current usage. Lots of that file seems to relate to classes that are strongly discouraged on Android: https://github.com/google/guava/wiki/Android#specifics I've only added this to the `common` module, since everyone that uses ExoPlayer must depend on that. This avoids duplicating this line into every module that has a Guava dependency. Also remove some other warning suppressions that are defined in both `core` and `common`. Issue: #7904 PiperOrigin-RevId: 332203086 --- RELEASENOTES.md | 3 +++ library/common/proguard-rules.txt | 3 +++ library/core/proguard-rules.txt | 5 ----- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 61a4a6900c..41cf46d3b7 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -5,6 +5,9 @@ * Data sources: * Add support for `android.resource` URI scheme in `RawResourceDataSource` ([#7866](https://github.com/google/ExoPlayer/issues/7866)). +* Core library: + * Suppress Guava-related ProGuard/R8 warnings + ([#7904](https://github.com/google/ExoPlayer/issues/7904)). ### 2.12.0 (2020-09-11) ### diff --git a/library/common/proguard-rules.txt b/library/common/proguard-rules.txt index c83dbaee2d..18e5264c20 100644 --- a/library/common/proguard-rules.txt +++ b/library/common/proguard-rules.txt @@ -4,3 +4,6 @@ -dontwarn org.checkerframework.** -dontwarn kotlin.annotations.jvm.** -dontwarn javax.annotation.** + +# From https://github.com/google/guava/wiki/UsingProGuardWithGuava +-dontwarn java.lang.ClassValue diff --git a/library/core/proguard-rules.txt b/library/core/proguard-rules.txt index 64c8cb2435..35a7fdfeaa 100644 --- a/library/core/proguard-rules.txt +++ b/library/core/proguard-rules.txt @@ -71,8 +71,3 @@ -keepclasseswithmembers class com.google.android.exoplayer2.source.smoothstreaming.SsMediaSource$Factory { (com.google.android.exoplayer2.upstream.DataSource$Factory); } - -# Don't warn about checkerframework and Kotlin annotations --dontwarn org.checkerframework.** --dontwarn kotlin.annotations.jvm.** --dontwarn javax.annotation.**