Skip to content

Commit f8aa71b

Browse files
ghasemdevmarkushi
andauthored
fix: sentry-android-ndk proguard rule keeps all native class (#4427)
* fix: sentry-androi-ndk proguard rule keeps all native class * docs: update CHANGELOG * fix: update CHANGELOG * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: Markus Hintersteiner <[email protected]> Co-authored-by: Markus Hintersteiner <[email protected]>
1 parent b2ab4eb commit f8aa71b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
- Deduplicate battery breadcrumbs ([#4561](https://github.com/getsentry/sentry-java/pull/4561))
1313
- Remove unused method in ManifestMetadataReader ([#4585](https://github.com/getsentry/sentry-java/pull/4585))
1414
- Have single `NetworkCallback` registered at a time to reduce IPC calls ([#4562](https://github.com/getsentry/sentry-java/pull/4562))
15+
- 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))
16+
- 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:
17+
```
18+
-keepclasseswithmembernames class * {
19+
native <methods>;
20+
}
21+
```
1522

1623
## 8.18.0
1724

sentry-android-ndk/proguard-rules.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-keep class io.sentry.protocol.DebugImage { *; }
88

99
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
10-
-keepclasseswithmembernames,includedescriptorclasses class * {
10+
-keepclasseswithmembernames,includedescriptorclasses class io.sentry.** {
1111
native <methods>;
1212
}
1313

0 commit comments

Comments
 (0)