All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openbakery.codesign.CodesignParameters.groovy Maven / Gradle / Ivy

Go to download

XCode-Plugin is a plugin to allow custom XCode projects to build as generated by CMake

The newest version!
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
		}

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy