Android: Try to setup crashlytics stack traces

This commit is contained in:
Vishesh Handa
2019-05-29 18:06:51 +02:00
parent 3fd801b4a1
commit 4ade7bf18d
3 changed files with 34 additions and 0 deletions

View File

@ -29,6 +29,9 @@ jobs:
- store_artifacts:
path: build/app/outputs/apk/release/app-release.apk
destination: gitjournal.apk
- run:
name: Upload Crashlytics Symbols
command: ./scripts/android_crashlytics.sh
- run:
name: Publish Beta
command: cd android && fastlane betaBuild

View File

@ -108,3 +108,9 @@ dependencies {
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
crashlytics {
enableNdk true
androidNdkOut "../../debugSymbols"
androidNdkLibsOut "../../build/app/intermediates/transforms/stripDebugSymbol/release/0/lib"
}

25
scripts/android_crashlytics.sh Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -x
set -eu
cd "$(dirname "$0")"
cd ../
# Copy mergeJniLibs to debugSymbols
cp -R ./build/app/intermediates/transforms/mergeJniLibs/release/0/lib debugSymbols
# The libflutter.so here is the same as in the artifacts.zip found with symbols.zip
cd debugSymbols/armeabi-v7a
# Download the corresponding libflutter.so with debug symbols
ENGINE_VERSION=$(cat $FLUTTER_HOME/bin/internal/engine.version)
gsutil cp gs://flutter_infra/flutter/${ENGINE_VERSION}/android-arm-release/symbols.zip .
# Replace libflutter.so
unzip -o symbols.zip
rm -rf symbols.zip
# Upload symbols to Crashlytics
cd ../../android
./gradlew crashlyticsUploadSymbolsRelease