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,11 +95,13 @@ 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()
if (crashlyticsAvailable) {
firebaseCrashlytics { firebaseCrashlytics {
nativeSymbolUploadEnabled true nativeSymbolUploadEnabled true
unstrippedNativeLibsDir file(LinphoneSdkBuildDir + '/libs-debug/').toString() unstrippedNativeLibsDir file(LinphoneSdkBuildDir + '/libs-debug/').toString()
} }
} }
}
release { release {
minifyEnabled true minifyEnabled true
@ -182,7 +186,9 @@ ktlint {
project.tasks['preBuild'].dependsOn 'ktlintFormat' project.tasks['preBuild'].dependsOn 'ktlintFormat'
if (crashlyticsAvailable) {
afterEvaluate { afterEvaluate {
assembleDebug.finalizedBy(uploadCrashlyticsSymbolFileDebug) assembleDebug.finalizedBy(uploadCrashlyticsSymbolFileDebug)
packageDebug.finalizedBy(uploadCrashlyticsSymbolFileDebug) packageDebug.finalizedBy(uploadCrashlyticsSymbolFileDebug)
} }
}