diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d7a68f409c..d38a251b873 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,13 @@ - Deduplicate battery breadcrumbs ([#4561](https://github.com/getsentry/sentry-java/pull/4561)) - Remove unused method in ManifestMetadataReader ([#4585](https://github.com/getsentry/sentry-java/pull/4585)) - Have single `NetworkCallback` registered at a time to reduce IPC calls ([#4562](https://github.com/getsentry/sentry-java/pull/4562)) +- 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.18.0 diff --git a/sentry-android-ndk/proguard-rules.pro b/sentry-android-ndk/proguard-rules.pro index 09e6fb6c7c0..db825e27b4d 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 ; }