mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 09:47:35 +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 {
|
ndk {
|
||||||
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
|
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
|
||||||
}
|
}
|
||||||
|
ext.enableCrashlytics = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ void main() async {
|
|||||||
var pref = await SharedPreferences.getInstance();
|
var pref = await SharedPreferences.getInstance();
|
||||||
Settings.instance.load(pref);
|
Settings.instance.load(pref);
|
||||||
|
|
||||||
|
assert(JournalApp.isInDebugMode = true);
|
||||||
var reportCrashes =
|
var reportCrashes =
|
||||||
!JournalApp.isInDebugMode && Settings.instance.collectCrashReports;
|
!JournalApp.isInDebugMode && Settings.instance.collectCrashReports;
|
||||||
|
|
||||||
@ -22,6 +23,7 @@ void main() async {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
print("Report Crashes: $reportCrashes");
|
||||||
if (reportCrashes) {
|
if (reportCrashes) {
|
||||||
await FlutterCrashlytics().initialize();
|
await FlutterCrashlytics().initialize();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user