diff --git a/doc/source/buildoptions.rst b/doc/source/buildoptions.rst index 22a7aa61e5..6497cc1d4e 100644 --- a/doc/source/buildoptions.rst +++ b/doc/source/buildoptions.rst @@ -96,6 +96,9 @@ options (this list may not be exhaustive): project directory. - ``--add-gradle-plugins``: Add a plugin for gradle. The format of the option is ``:``. The option can be specified multiple times. +- ``--enable-crashlytics-native-symbol-upload``: Enable processing and uploading + of native symbols to Firebase servers. This flag must be enabled to see + properly-symbolicated native stack traces in the Crashlytics dashboard. webview @@ -162,6 +165,9 @@ ready. project directory. - ``--add-gradle-plugins``: Add a plugin for gradle. The format of the option is ``:``. The option can be specified multiple times. +- ``--enable-crashlytics-native-symbol-upload``: Enable processing and uploading + of native symbols to Firebase servers. This flag must be enabled to see + properly-symbolicated native stack traces in the Crashlytics dashboard. service_library diff --git a/pythonforandroid/bootstraps/common/build/build.py b/pythonforandroid/bootstraps/common/build/build.py index aef357b1ca..71d1b2da6d 100755 --- a/pythonforandroid/bootstraps/common/build/build.py +++ b/pythonforandroid/bootstraps/common/build/build.py @@ -889,6 +889,9 @@ def parse_args_and_make_package(args=None): ap.add_argument('--google-services-json', dest='google_services_json', default='google-services.json', help='Path to google-services.json file') + ap.add_argument('--enable-crashlytics-native-symbol-upload', dest='enable_crashlytics_native_symbol_upload', + action='store-true', + help='Enable processing and uploading of native symbols to Firebase servers.') # Put together arguments, and add those from .p4a config file: if args is None: diff --git a/pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle b/pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle index 71c8c36e25..d88b4be56e 100644 --- a/pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle +++ b/pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle @@ -92,6 +92,11 @@ android { {% if args.sign -%} signingConfig signingConfigs.release {%- endif %} + {$ if args.enable_crashlytics_native_symbol_upload -%} + firebaseCrashlytics { + nativeSymbolUploadEnabled true + } + {%- endif %} } }