Fixed CI build to due debug libs not found, disabling crashlytics upload in that case

This commit is contained in:
Sylvain Berfini 2023-12-13 15:28:31 +01:00
parent 5d3d8eeedc
commit 919abd3bd3

View file

@ -11,6 +11,8 @@ plugins {
def packageName = "org.linphone" def packageName = "org.linphone"
def crashlyticsAvailable = new File(projectDir.absolutePath +'/google-services.json').exists() && new File(LinphoneSdkBuildDir + '/libs/').exists() && new File(LinphoneSdkBuildDir + '/libs-debug/').exists()
configurations { configurations {
customImplementation.extendsFrom implementation customImplementation.extendsFrom implementation
} }
@ -93,9 +95,11 @@ android {
resValue "string", "linphone_app_version", gitVersion.toString().trim() resValue "string", "linphone_app_version", gitVersion.toString().trim()
resValue "string", "linphone_app_branch", gitBranch.toString().trim() resValue "string", "linphone_app_branch", gitBranch.toString().trim()
firebaseCrashlytics { if (crashlyticsAvailable) {
nativeSymbolUploadEnabled true firebaseCrashlytics {
unstrippedNativeLibsDir file(LinphoneSdkBuildDir + '/libs-debug/').toString() nativeSymbolUploadEnabled true
unstrippedNativeLibsDir file(LinphoneSdkBuildDir + '/libs-debug/').toString()
}
} }
} }
@ -182,7 +186,9 @@ ktlint {
project.tasks['preBuild'].dependsOn 'ktlintFormat' project.tasks['preBuild'].dependsOn 'ktlintFormat'
afterEvaluate { if (crashlyticsAvailable) {
assembleDebug.finalizedBy(uploadCrashlyticsSymbolFileDebug) afterEvaluate {
packageDebug.finalizedBy(uploadCrashlyticsSymbolFileDebug) assembleDebug.finalizedBy(uploadCrashlyticsSymbolFileDebug)
packageDebug.finalizedBy(uploadCrashlyticsSymbolFileDebug)
}
} }