Package gmbh.pagina.tools.gradle.mac_app
Class SignAndNotarize
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
gmbh.pagina.tools.gradle.mac_app.SignAndNotarize
- All Implemented Interfaces:
Comparable<org.gradle.api.Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.plugins.ExtensionAware,org.gradle.api.Task,org.gradle.util.Configurable<org.gradle.api.Task>
@DisableCachingByDefault(because="Signing/notarization depends on external services and keychain state")
public class SignAndNotarize
extends org.gradle.api.DefaultTask
The task that signs and notarizes the mac app. Only works on macOS.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Task
org.gradle.api.Task.Namer -
Field Summary
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionCreates the task with default metadata and disables up-to-date checks. -
Method Summary
Modifier and TypeMethodDescriptionGets the Apple ID password.Gets the Apple team ID used for notarization.Gets the Apple ID user account.Gets the Apple signing identity.Gets the app name used for output artifacts.org.gradle.api.provider.Property<String> Returns the app name property.Gets the path to the signing certificate.Gets the certificate password.Gets the configured existing input app bundle.org.gradle.api.file.DirectoryPropertyReturns the existing app bundle property.Gets the keychain name used for signing operations.Gets the keychain password.Gets the configured mac app icon path.org.gradle.api.provider.Property<String> Returns the mac app icon property.Returns the notarized DMG output file.Gets the output directory used for signed artifacts.org.gradle.api.file.DirectoryPropertyReturns the output directory property.Gets the project version.org.gradle.api.provider.Property<String> Returns the project version property.Returns the signed and notarized app bundle directory.Gets the signed app tar.gz archive path.org.gradle.api.provider.Property<Boolean> Returns the sign nested binaries property.org.gradle.api.file.DirectoryPropertyReturns the unsigned app directory property.booleanGets whether to recursively sign binaries nested inside jar/zip files.voidsetAppleIDPassword(String appleIDPassword) Sets the Apple ID password.voidsetAppleIDTeamID(String appleIDTeamID) Sets the Apple team ID used for notarization.voidsetAppleIDUser(String appleIDUser) Sets the Apple ID user account.voidsetAppleSignID(String appleSignID) Sets the Apple signing identity.voidsetCertificate(String certificate) Sets the path to the signing certificate.voidsetCertificatePassword(String certificatePassword) Sets the certificate password.voidsetExistingMacAppBundle(File existingMacAppBundle) Sets an existing input app bundle.voidsetExistingMacAppBundle(String existingMacAppBundle) Sets an existing input app bundle path.voidsetKeychainName(String keychainName) Sets the keychain name used for signing operations.voidsetKeychainPassword(String keychainPassword) Sets the keychain password.voidsetMacAppIcon(String macAppIcon) Sets the configured mac app icon path.voidSets the output directory.voidSets the output directory path.voidsetProjectVersion(String projectVersion) Sets the project version.voidsetSignNestedBinaries(boolean signNestedBinaries) Sets whether to recursively sign binaries nested inside jar/zip files.voidThe execution of the task.Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
Constructor Details
-
SignAndNotarize
public SignAndNotarize()Creates the task with default metadata and disables up-to-date checks.
-
-
Method Details
-
getKeychainName
Gets the keychain name used for signing operations.- Returns:
- keychain name
-
setKeychainName
Sets the keychain name used for signing operations.- Parameters:
keychainName- keychain name
-
getKeychainPassword
Gets the keychain password.- Returns:
- keychain password
-
setKeychainPassword
Sets the keychain password.- Parameters:
keychainPassword- keychain password
-
getCertificate
Gets the path to the signing certificate.- Returns:
- certificate path, or null when unset
-
setCertificate
Sets the path to the signing certificate.- Parameters:
certificate- certificate path
-
getCertificatePassword
Gets the certificate password.- Returns:
- certificate password, or null when unset
-
setCertificatePassword
Sets the certificate password.- Parameters:
certificatePassword- certificate password
-
getAppleSignID
Gets the Apple signing identity.- Returns:
- Apple signing identity, or null when unset
-
setAppleSignID
Sets the Apple signing identity.- Parameters:
appleSignID- Apple signing identity
-
getAppleIDUser
Gets the Apple ID user account.- Returns:
- Apple ID user, or null when unset
-
setAppleIDUser
Sets the Apple ID user account.- Parameters:
appleIDUser- Apple ID user
-
getAppleIDPassword
Gets the Apple ID password.- Returns:
- Apple ID password, or null when unset
-
setAppleIDPassword
Sets the Apple ID password.- Parameters:
appleIDPassword- Apple ID password
-
getAppleIDTeamID
Gets the Apple team ID used for notarization.- Returns:
- Apple team ID, or null when unset
-
setAppleIDTeamID
Sets the Apple team ID used for notarization.- Parameters:
appleIDTeamID- Apple team ID
-
getOutdir
Gets the output directory used for signed artifacts.- Returns:
- output directory
-
setOutdir
Sets the output directory path.- Parameters:
outdir- output directory path
-
setOutdir
Sets the output directory.- Parameters:
outdir- output directory
-
getAppName
Gets the app name used for output artifacts.- Returns:
- app name
-
getUnsignedMacAppDirectoryProperty
@Internal public org.gradle.api.file.DirectoryProperty getUnsignedMacAppDirectoryProperty()Returns the unsigned app directory property.- Returns:
- unsigned app directory property
-
getExistingMacAppBundle
Gets the configured existing input app bundle.- Returns:
- existing input app bundle, or null when unset
-
setExistingMacAppBundle
Sets an existing input app bundle path.- Parameters:
existingMacAppBundle- path to existing app bundle
-
setExistingMacAppBundle
Sets an existing input app bundle.- Parameters:
existingMacAppBundle- existing app bundle
-
getExistingMacAppBundleProperty
@Internal public org.gradle.api.file.DirectoryProperty getExistingMacAppBundleProperty()Returns the existing app bundle property.- Returns:
- existing app bundle property
-
getMacAppIcon
Gets the configured mac app icon path.- Returns:
- icon path, or null when unset
-
setMacAppIcon
Sets the configured mac app icon path.- Parameters:
macAppIcon- icon path
-
getProjectVersion
Gets the project version.- Returns:
- project version
-
setProjectVersion
Sets the project version.- Parameters:
projectVersion- project version
-
getAppNameProperty
Returns the app name property.- Returns:
- app name property
-
getMacAppIconProperty
Returns the mac app icon property.- Returns:
- mac app icon property
-
getProjectVersionProperty
Returns the project version property.- Returns:
- project version property
-
getOutdirProperty
@Internal public org.gradle.api.file.DirectoryProperty getOutdirProperty()Returns the output directory property.- Returns:
- output directory property
-
isSignNestedBinaries
@Input public boolean isSignNestedBinaries()Gets whether to recursively sign binaries nested inside jar/zip files.- Returns:
- true if nested binary signing is enabled, false otherwise
-
setSignNestedBinaries
public void setSignNestedBinaries(boolean signNestedBinaries) Sets whether to recursively sign binaries nested inside jar/zip files.- Parameters:
signNestedBinaries- true to enable nested binary signing, false to disable
-
getSignNestedBinariesProperty
Returns the sign nested binaries property.- Returns:
- sign nested binaries property
-
getSignedAndNotarizedMacApp
Returns the signed and notarized app bundle directory.- Returns:
- signed app directory
-
getNotarizedDMG
Returns the notarized DMG output file.- Returns:
- notarized DMG file
-
getSignedAndNotarizedMacAppTarGz
Gets the signed app tar.gz archive path.- Returns:
- signed app archive file
-
taskAction
public void taskAction()The execution of the task.
-