Browse Source

Fix signing settings when no Keychain is specified - Fixed (#1152)

Closes #1086
Closes #1020
feature/test_remove_jcenter
Mitchell Syer 3 years ago committed by GitHub
parent
commit
8371226f66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/internal/validation/ValidatedMacOSSigningSettings.kt

10
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/internal/validation/ValidatedMacOSSigningSettings.kt

@ -44,14 +44,14 @@ internal fun MacOSSigningSettings.validate(
val signIdentity = this.identity.orNull
?: error(ERR_UNKNOWN_SIGN_ID)
val keychainPath = this.keychain.orNull
val keychainFile =
listOf(project.file(keychainPath), project.rootProject.file(keychainPath))
val keychainFile = if (keychainPath != null) {
val keychainFile = listOf(project.file(keychainPath), project.rootProject.file(keychainPath))
.firstOrNull { it.exists() }
if (keychainPath != null) {
check(keychainFile != null && keychainFile.exists()) {
check(keychainFile != null) {
"$ERR_PREFIX could not find the specified keychain: $keychainPath"
}
}
keychainFile
} else null
return ValidatedMacOSSigningSettings(
bundleID = bundleID,

Loading…
Cancel
Save