From b65c392cb6e20d72c6665d07784bea323da7b181 Mon Sep 17 00:00:00 2001 From: Ghasem Shirdel Date: Wed, 21 May 2025 10:37:46 +0330 Subject: [PATCH 1/5] fix: sentry-androi-ndk proguard rule keeps all native class --- sentry-android-ndk/proguard-rules.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ; } From 448c46bf1da5b67b3c9aeb8e00557d9492e3bb86 Mon Sep 17 00:00:00 2001 From: Ghasem Shirdel Date: Wed, 21 May 2025 12:37:43 +0330 Subject: [PATCH 2/5] docs: update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 980d37262de..c868a64d514 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ - Use `Sentry.replay().enableDebugMaskingOverlay()` to overlay the screen with the Session Replay masks. - The masks will be invalidated at most once per `frameRate` (default 1 fps). +### Fixes + +- Overly broad Proguard rule in `sentry-android-ndk` keeping all native methods. + ## 8.12.0 ### Features From 93ad35bb27922c4d4caa89714790cf4b1a92c5d5 Mon Sep 17 00:00:00 2001 From: Ghasem Shirdel Date: Wed, 21 May 2025 12:38:19 +0330 Subject: [PATCH 3/5] fix: update CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c868a64d514..3c7248baaec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ ### Fixes -- Overly broad Proguard rule in `sentry-android-ndk` keeping all native methods. +- Overly broad Proguard rule in `sentry-android-ndk` keeping all native methods. ([#4427](https://github.com/getsentry/sentry-java/pull/4427)) ## 8.12.0 From 4161556e742f3c6b68378d6c17869e757899f08d Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Thu, 12 Jun 2025 07:39:42 +0200 Subject: [PATCH 4/5] Update CHANGELOG.md --- CHANGELOG.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f210a175cc..2c97a048e51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,13 @@ - Session Replay: Do not capture current replay for cached events from the past ([#4474](https://github.com/getsentry/sentry-java/pull/4474)) - 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)) +- 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 @@ -62,10 +69,6 @@ - Bump Spring Boot to `3.5.0` ([#4111](https://github.com/getsentry/sentry-java/pull/4111)) -### Fixes - -- Overly broad Proguard rule in `sentry-android-ndk` keeping all native methods. ([#4427](https://github.com/getsentry/sentry-java/pull/4427)) - ## 8.12.0 ### Features From 84eba05d847a33e79b2bfcad82d23e62a604e97e Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Tue, 5 Aug 2025 09:47:17 +0200 Subject: [PATCH 5/5] Update CHANGELOG.md --- CHANGELOG.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5afab5955ed..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 @@ -245,13 +252,6 @@ - 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