Skip to content

Commit 1ef6e29

Browse files
committed
add task to upload debug symbols
1 parent 0b22e69 commit 1ef6e29

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ android {
5151
manifestPlaceholders = {{ args.manifest_placeholders}}
5252
}
5353

54+
{% if args.enable_crashlytics_native_symbol_upload -%}
55+
tasks.whenTaskAdded { task ->
56+
if (task.name.startsWith('assemble') && task.name != "assembleReleaseAndroidTest" && task.name != "assembleDebugAndroidTest") {
57+
task.finalizedBy "uploadCrashlyticsSymbolFile" + task.name.substring('assemble'.length())
58+
}
59+
}
60+
{%- endif %}
5461

5562
packagingOptions {
5663
jniLibs {
@@ -87,6 +94,12 @@ android {
8794

8895
buildTypes {
8996
debug {
97+
{% if args.enable_crashlytics_native_symbol_upload -%}
98+
firebaseCrashlytics {
99+
nativeSymbolUploadEnabled true
100+
unstrippedNativeLibsDir 'obj/local'
101+
}
102+
{%- endif %}
90103
}
91104
release {
92105
{% if args.sign -%}
@@ -95,8 +108,7 @@ android {
95108
{% if args.enable_crashlytics_native_symbol_upload -%}
96109
firebaseCrashlytics {
97110
nativeSymbolUploadEnabled true
98-
strippedNativeLibsDir 'build/intermediates/stripped_native_libs/release/out/lib'
99-
unstrippedNativeLibsDir 'build/intermediates/merged_native_libs/release/out/lib'
111+
unstrippedNativeLibsDir 'obj/local'
100112
}
101113
{%- endif %}
102114
}

0 commit comments

Comments
 (0)