org.openbakery.codesign.CodesignParameters.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xcode-plugin Show documentation
Show all versions of xcode-plugin Show documentation
XCode-Plugin is a plugin to allow custom XCode projects to build as generated by CMake
package org.openbakery.codesign
import org.openbakery.CommandRunner
import org.openbakery.xcode.Type
class CodesignParameters {
String signingIdentity
List mobileProvisionFiles
File keychain
Security security
Type type
/*
user this entitlements file for codesigning, nothing is extracted from the mobile provisioning profile
*/
File entitlementsFile
Map entitlements
CodesignParameters() {
security = new Security(new CommandRunner())
}
String getSigningIdentity() {
if (signingIdentity == null) {
if (keychain != null && keychain.exists()) {
signingIdentity = security.getIdentity(keychain)
}
}
return signingIdentity
}
void mergeMissing(CodesignParameters parameters) {
if (signingIdentity == null) {
signingIdentity = parameters.signingIdentity
}
if (keychain == null) {
keychain = parameters.keychain
}
if ((mobileProvisionFiles == null || mobileProvisionFiles.isEmpty()) && parameters.mobileProvisionFiles != null) {
mobileProvisionFiles = parameters.mobileProvisionFiles.clone()
}
if (type == null) {
type = parameters.type
}
if (entitlementsFile == null) {
entitlementsFile = parameters.entitlementsFile
}
if (entitlements == null) {
entitlements = parameters.entitlements
}
}
}