diff --git a/CHANGELOG.md b/CHANGELOG.md index a0774abddf..17d439d05e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,13 @@ - Session Replay: Correctly capture Dialogs and non full-sized windows ([#4354](https://github.com/getsentry/sentry-java/pull/4354)) - Session Replay: Fix inconsistent `segment_id` ([#4471](https://github.com/getsentry/sentry-java/pull/4471)) - Session Replay: Fix crash on devices with the Unisoc/Spreadtrum T606 chipset ([#4477](https://github.com/getsentry/sentry-java/pull/4477)) +- Limit ProGuard keep rules for native methods within `sentry-android-ndk` to the `io.sentry.**` namespace. ([#4427](https://github.com/getsentry/sentry-java/pull/4427)) + - If you relied on the Sentry SDK to keep native method names for JNI compatibility within your namespace, please review your ProGuard rules and ensure the configuration still works. Especially when you're not consuming any of the default Android proguard rules (`proguard-android.txt` or `proguard-android-optimize.txt`) the following config should be present: + ``` + -keepclasseswithmembernames class * { + native ; + } + ``` ## 8.13.2 diff --git a/sentry-android-ndk/proguard-rules.pro b/sentry-android-ndk/proguard-rules.pro index 09e6fb6c7c..db825e27b4 100644 --- a/sentry-android-ndk/proguard-rules.pro +++ b/sentry-android-ndk/proguard-rules.pro @@ -7,7 +7,7 @@ -keep class io.sentry.protocol.DebugImage { *; } # For native methods, see http://proguard.sourceforge.net/manual/examples.html#native --keepclasseswithmembernames,includedescriptorclasses class * { +-keepclasseswithmembernames,includedescriptorclasses class io.sentry.** { native ; }