From 50566fb8acb2919ead9c4fea7c6a228b1d020388 Mon Sep 17 00:00:00 2001 From: ibaker Date: Mon, 26 Oct 2020 16:10:20 +0000 Subject: [PATCH] Suppress ProGuard warnings related to Guava's compile-only deps Without these lines, ProGuard fails on the demo app (R8 works). Also include some more `-dontwarn` lines from https://github.com/google/guava/wiki/UsingProGuardWithGuava #minor-release Issue: #8103 PiperOrigin-RevId: 339050634 --- RELEASENOTES.md | 2 ++ library/common/proguard-rules.txt | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index e567e38f6c3..65800a2de32 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -21,6 +21,8 @@ * Suppress exceptions from registering/unregistering the stream volume receiver ([#8087](https://github.com/google/ExoPlayer/issues/8087)), ([#8106](https://github.com/google/ExoPlayer/issues/8106)). + * Suppress ProGuard warnings caused by Guava's compile-only dependencies + ([#8103](https://github.com/google/ExoPlayer/issues/8103)). * Track selection: * Add option to specify multiple preferred audio or text languages. * UI: diff --git a/library/common/proguard-rules.txt b/library/common/proguard-rules.txt index 18e5264c203..8de310a867f 100644 --- a/library/common/proguard-rules.txt +++ b/library/common/proguard-rules.txt @@ -7,3 +7,12 @@ # 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