From d818be32217e05569e55733283c3ddaeea3a8b49 Mon Sep 17 00:00:00 2001 From: xcho Date: Thu, 3 Nov 2022 14:35:37 +0200 Subject: [PATCH 1/2] enable processing and uploading of native symbols to Firebase servers --- doc/source/buildoptions.rst | 3 +++ pythonforandroid/bootstraps/common/build/build.py | 3 +++ .../bootstraps/common/build/templates/build.tmpl.gradle | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/doc/source/buildoptions.rst b/doc/source/buildoptions.rst index 22a7aa61e5..ac2ef3d19b 100644 --- a/doc/source/buildoptions.rst +++ b/doc/source/buildoptions.rst @@ -162,6 +162,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 %} } } From 987ff074f81a383a8bc4a711b7f5f07e229d08da Mon Sep 17 00:00:00 2001 From: xcho Date: Thu, 3 Nov 2022 14:38:58 +0200 Subject: [PATCH 2/2] add entry to build options --- doc/source/buildoptions.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/source/buildoptions.rst b/doc/source/buildoptions.rst index ac2ef3d19b..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