From 2ae42b8243206463b9e5dd502acf1731804963e3 Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Mon, 13 Jun 2022 18:31:23 +0200 Subject: [PATCH] Workaround R8 bug by adding a new proguard rule (#2094) --- CHANGELOG.md | 4 ++++ sentry-android-core/proguard-rules.pro | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04bc27f4cf..a71ded7da5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Implement local scope by adding overloads to the capture methods that accept a ScopeCallback ([#2084](https://github.com/getsentry/sentry-java/pull/2084)) +### Fixes + +- Fix proguard rules to work R8 [issue](https://issuetracker.google.com/issues/235733922) around on AGP 7.3.0-betaX and 7.4.0-alphaX ([#2094](https://github.com/getsentry/sentry-java/pull/2094)) + ## 6.0.0 ### Sentry Self-hosted Compatibility diff --git a/sentry-android-core/proguard-rules.pro b/sentry-android-core/proguard-rules.pro index f092eca7e0..048871d26f 100644 --- a/sentry-android-core/proguard-rules.pro +++ b/sentry-android-core/proguard-rules.pro @@ -11,6 +11,10 @@ -keep class androidx.lifecycle.ProcessLifecycleOwner { (...); } ##---------------End: proguard configuration for androidx.lifecycle ---------- +# To mitigate the issue on R8 site (https://issuetracker.google.com/issues/235733922) +# which comes through AGP 7.3.0-betaX and 7.4.0-alphaX +-keepclassmembers enum io.sentry.** { *; } + # don't warn jetbrains annotations -dontwarn org.jetbrains.annotations.** # don't warn about missing classes (mainly for Guardsquare's proguard).