From d13d31950da1fd87ae9f44d4146569d6ac909a90 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 24 Jan 2024 11:37:47 +0100 Subject: [PATCH] Report NDK crashes --- .github/workflows/android.yml | 3 ++- app/build.gradle | 4 ++-- app/src/main/java/eu/faircode/email/Log.java | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 26c1385253..8e41be7622 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -44,7 +44,8 @@ jobs: - name: Check with Lint run: ./gradlew lintGithubRelease - name: Build with Gradle - run: ./gradlew assembleGithubRelease assembleLargeRelease assemblePlayRelease uploadBugsnagGithub-releaseMapping uploadBugsnagLarge-releaseMapping uploadBugsnagPlay-releaseMapping + #https://docs.bugsnag.com/build-integrations/gradle/#manual-upload + run: ./gradlew assembleGithubRelease assembleLargeRelease assemblePlayRelease uploadBugsnagGithub-releaseMapping uploadBugsnagLarge-releaseMapping uploadBugsnagPlay-releaseMapping uploadBugsnagNdkGithub-releaseMapping uploadBugsnagNdkLarge-releaseMapping uploadBugsnagNdkPlay-releaseMapping - name: Upload to BitBucket run: | ./gradlew upload -Ptarget=play-preview diff --git a/app/build.gradle b/app/build.gradle index 35caadca8b..4dab223e98 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -357,7 +357,7 @@ android { bugsnag { // https://docs.bugsnag.com/build-integrations/gradle/ uploadJvmMappings = false // disables upload of ProGuard/DexGuard/R8 mapping files - uploadNdkMappings = false // disables upload of NDK mapping files + uploadNdkMappings = true // disables upload of NDK mapping files reportBuilds = false // disables upload of build metadata overwrite = true builderName = "M66B" @@ -736,7 +736,7 @@ dependencies { // https://mvnrepository.com/artifact/com.bugsnag/bugsnag-android implementation("com.bugsnag:bugsnag-android:$bugsnag_version") { exclude group: "com.bugsnag", module: "bugsnag-plugin-android-anr" - exclude group: "com.bugsnag", module: "bugsnag-plugin-android-ndk" + //exclude group: "com.bugsnag", module: "bugsnag-plugin-android-ndk" exclude group: "com.bugsnag", module: "bugsnag-android-core" } diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index f391af7d59..fbb356e38c 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -408,7 +408,8 @@ public class Log { ErrorTypes etypes = new ErrorTypes(); etypes.setAnrs(BuildConfig.DEBUG); - etypes.setNdkCrashes(false); + etypes.setNdkCrashes(true); + etypes.setUnhandledExceptions(true); config.setEnabledErrorTypes(etypes); config.setMaxBreadcrumbs(BuildConfig.PLAY_STORE_RELEASE ? 250 : 500);