-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crashlytics NDK Proguard config is incorrect #6593
Comments
Hi @nathan3d, thank you for reaching out. According to Firebase SDK docs,
From what I gather, Android Gradle Plugin (AGP) seamlessly integrates ProGuard into the build process; other build systems require manual configuration. For more information, you can check this for reference. However, based on proguard documentation for processing native methods,
I suggest checking DexGuard, this is a commercial extension of ProGuard. DexGuard is specialized for Android applications and libraries: it optimizes and obfuscates not just the bytecode, but also the manifest file, resources, resource files, asset files, and native libraries. |
Hi @lehcar09, There are Proguard/R8 rules for the NDK published as part of the project here: https://github.com/firebase/firebase-android-sdk/blob/main/firebase-crashlytics-ndk/firebase-crashlytics-ndk-proguard.txt. They're just not correct. |
Thank you for your clarification. Based on my understanding with proguard, the rule;
aims to keep all classes with native methods across your entire project. While the rule,
specific rules for Firebase Crashlytics that are designed to preserve particular classes and their native methods. However, adding the broad rule might have side effects on optimizations. I’ll raise this to our engineers and see what we can do here. Thanks! |
Right. The problem is JNINativeApi isn't public, so this rule has no effect. |
Hey @nathan3d. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs in the code in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
with the firebase tag.
google group.
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
The keep rules for the Crashlytics NDK are limited to public classes, but at the minimum JniNativeApi is not a public class, so the included rules don't actually apply.
The Android Gradle Plugin includes this rule that mitigates the issue when used, but for builds using other build systems, this may not be present.
The text was updated successfully, but these errors were encountered: