Added logs to help troubleshoot release APK signing

This commit is contained in:
Sylvain Berfini 2024-08-13 11:56:51 +02:00
parent 1d0b5a5d4d
commit 415da6f03d
3 changed files with 17 additions and 5 deletions

1
.gitignore vendored
View file

@ -10,3 +10,4 @@ local.properties
app/debug/
app/release/
.idea/
app/bc-android.keystore

View file

@ -116,10 +116,17 @@ android {
signingConfigs {
create("release") {
storeFile = File(keystoreProperties["storeFile"].toString())
storePassword = keystoreProperties["storePassword"].toString()
keyAlias = keystoreProperties["keyAlias"].toString()
keyPassword = keystoreProperties["keyPassword"].toString()
val keyStorePath = keystoreProperties["storeFile"] as String
val keyStore = project.file(keyStorePath)
if (keyStore.exists()) {
storeFile = keyStore
storePassword = keystoreProperties["storePassword"] as String
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
println("Signing config release is using keystore [$storeFile]")
} else {
println("Keystore [$storeFile] doesn't exists!")
}
}
}
@ -153,6 +160,7 @@ android {
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("release")
resValue("string", "file_provider", "$packageName.fileprovider")
resValue("string", "linphone_app_version", gitVersion.trim())

View file

@ -277,7 +277,10 @@ class MessageModel @WorkerThread constructor(
coreContext.postOnMainThread {
firstFileModel.addSource(filesList) {
firstFileModel.value = it.firstOrNull()
val first = it.firstOrNull()
if (first != null) {
firstFileModel.value = first!!
}
}
}
}