|
|
@ -11,7 +11,7 @@ import org.jetbrains.compose.desktop.application.internal.ComposeProperties |
|
|
|
internal data class ValidatedMacOSNotarizationSettings( |
|
|
|
internal data class ValidatedMacOSNotarizationSettings( |
|
|
|
val appleID: String, |
|
|
|
val appleID: String, |
|
|
|
val password: String, |
|
|
|
val password: String, |
|
|
|
val teamID: String? |
|
|
|
val teamID: String |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
internal fun MacOSNotarizationSettings?.validate(): ValidatedMacOSNotarizationSettings { |
|
|
|
internal fun MacOSNotarizationSettings?.validate(): ValidatedMacOSNotarizationSettings { |
|
|
@ -25,10 +25,13 @@ internal fun MacOSNotarizationSettings?.validate(): ValidatedMacOSNotarizationSe |
|
|
|
check(!password.orNull.isNullOrEmpty()) { |
|
|
|
check(!password.orNull.isNullOrEmpty()) { |
|
|
|
ERR_PASSWORD_IS_EMPTY |
|
|
|
ERR_PASSWORD_IS_EMPTY |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
check(!teamID.orNull.isNullOrEmpty()) { |
|
|
|
|
|
|
|
TEAM_ID_IS_EMPTY |
|
|
|
|
|
|
|
} |
|
|
|
return ValidatedMacOSNotarizationSettings( |
|
|
|
return ValidatedMacOSNotarizationSettings( |
|
|
|
appleID = appleID.orNull!!, |
|
|
|
appleID = appleID.orNull!!, |
|
|
|
password = password.orNull!!, |
|
|
|
password = password.orNull!!, |
|
|
|
teamID = teamID.orNull |
|
|
|
teamID = teamID.orNull!! |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -45,3 +48,8 @@ private val ERR_PASSWORD_IS_EMPTY = |
|
|
|
| * Use '${ComposeProperties.MAC_NOTARIZATION_PASSWORD}' Gradle property; |
|
|
|
| * Use '${ComposeProperties.MAC_NOTARIZATION_PASSWORD}' Gradle property; |
|
|
|
| * Or use 'nativeDistributions.macOS.notarization.password' DSL property; |
|
|
|
| * Or use 'nativeDistributions.macOS.notarization.password' DSL property; |
|
|
|
""".trimMargin() |
|
|
|
""".trimMargin() |
|
|
|
|
|
|
|
private val TEAM_ID_IS_EMPTY = |
|
|
|
|
|
|
|
"""|$ERR_PREFIX teamID is null or empty. To specify: |
|
|
|
|
|
|
|
| * Use '${ComposeProperties.MAC_NOTARIZATION_TEAM_ID_PROVIDER}' Gradle property; |
|
|
|
|
|
|
|
| * Or use 'nativeDistributions.macOS.notarization.teamID' DSL property; |
|
|
|
|
|
|
|
""".trimMargin() |
|
|
|