mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-27 17:29:50 +08:00
Crashlytics: Disable in debug builds
This way no matter what, a debug build will not report to crashlytics. As it currently did.
This commit is contained in:
@ -77,6 +77,7 @@ android {
|
||||
ndk {
|
||||
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
|
||||
}
|
||||
ext.enableCrashlytics = false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ void main() async {
|
||||
var pref = await SharedPreferences.getInstance();
|
||||
Settings.instance.load(pref);
|
||||
|
||||
assert(JournalApp.isInDebugMode = true);
|
||||
var reportCrashes =
|
||||
!JournalApp.isInDebugMode && Settings.instance.collectCrashReports;
|
||||
|
||||
@ -22,6 +23,7 @@ void main() async {
|
||||
}
|
||||
};
|
||||
|
||||
print("Report Crashes: $reportCrashes");
|
||||
if (reportCrashes) {
|
||||
await FlutterCrashlytics().initialize();
|
||||
}
|
||||
|
Reference in New Issue
Block a user