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

    Constructors
    Constructor
    Description
    Creates the task with default metadata and disables up-to-date checks.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets 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.DirectoryProperty
    Returns 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.DirectoryProperty
    Returns 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.file.DirectoryProperty
    Returns the unsigned app directory property.
    void
    setAppleIDPassword(String appleIDPassword)
    Sets the Apple ID password.
    void
    setAppleIDTeamID(String appleIDTeamID)
    Sets the Apple team ID used for notarization.
    void
    setAppleIDUser(String appleIDUser)
    Sets the Apple ID user account.
    void
    setAppleSignID(String appleSignID)
    Sets the Apple signing identity.
    void
    setCertificate(String certificate)
    Sets the path to the signing certificate.
    void
    setCertificatePassword(String certificatePassword)
    Sets the certificate password.
    void
    setExistingMacAppBundle(File existingMacAppBundle)
    Sets an existing input app bundle.
    void
    setExistingMacAppBundle(String existingMacAppBundle)
    Sets an existing input app bundle path.
    void
    setKeychainName(String keychainName)
    Sets the keychain name used for signing operations.
    void
    setKeychainPassword(String keychainPassword)
    Sets the keychain password.
    void
    setMacAppIcon(String macAppIcon)
    Sets the configured mac app icon path.
    void
    setOutdir(File outdir)
    Sets the output directory.
    void
    setOutdir(String outdir)
    Sets the output directory path.
    void
    setProjectVersion(String projectVersion)
    Sets the project version.
    void
    The 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, usesService

    Methods 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, setImpliesSubProjects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      @Input public String getKeychainName()
      Gets the keychain name used for signing operations.
      Returns:
      keychain name
    • setKeychainName

      public void setKeychainName(String keychainName)
      Sets the keychain name used for signing operations.
      Parameters:
      keychainName - keychain name
    • getKeychainPassword

      @Input public String getKeychainPassword()
      Gets the keychain password.
      Returns:
      keychain password
    • setKeychainPassword

      public void setKeychainPassword(String keychainPassword)
      Sets the keychain password.
      Parameters:
      keychainPassword - keychain password
    • getCertificate

      @Input @Optional public String getCertificate()
      Gets the path to the signing certificate.
      Returns:
      certificate path, or null when unset
    • setCertificate

      public void setCertificate(String certificate)
      Sets the path to the signing certificate.
      Parameters:
      certificate - certificate path
    • getCertificatePassword

      @Input @Optional public String getCertificatePassword()
      Gets the certificate password.
      Returns:
      certificate password, or null when unset
    • setCertificatePassword

      public void setCertificatePassword(String certificatePassword)
      Sets the certificate password.
      Parameters:
      certificatePassword - certificate password
    • getAppleSignID

      @Input @Optional public String getAppleSignID()
      Gets the Apple signing identity.
      Returns:
      Apple signing identity, or null when unset
    • setAppleSignID

      public void setAppleSignID(String appleSignID)
      Sets the Apple signing identity.
      Parameters:
      appleSignID - Apple signing identity
    • getAppleIDUser

      @Input @Optional public String getAppleIDUser()
      Gets the Apple ID user account.
      Returns:
      Apple ID user, or null when unset
    • setAppleIDUser

      public void setAppleIDUser(String appleIDUser)
      Sets the Apple ID user account.
      Parameters:
      appleIDUser - Apple ID user
    • getAppleIDPassword

      @Input @Optional public String getAppleIDPassword()
      Gets the Apple ID password.
      Returns:
      Apple ID password, or null when unset
    • setAppleIDPassword

      public void setAppleIDPassword(String appleIDPassword)
      Sets the Apple ID password.
      Parameters:
      appleIDPassword - Apple ID password
    • getAppleIDTeamID

      @Input @Optional public String getAppleIDTeamID()
      Gets the Apple team ID used for notarization.
      Returns:
      Apple team ID, or null when unset
    • setAppleIDTeamID

      public void setAppleIDTeamID(String appleIDTeamID)
      Sets the Apple team ID used for notarization.
      Parameters:
      appleIDTeamID - Apple team ID
    • getOutdir

      @Internal public File getOutdir()
      Gets the output directory used for signed artifacts.
      Returns:
      output directory
    • setOutdir

      public void setOutdir(String outdir)
      Sets the output directory path.
      Parameters:
      outdir - output directory path
    • setOutdir

      public void setOutdir(File outdir)
      Sets the output directory.
      Parameters:
      outdir - output directory
    • getAppName

      @Input public String 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

      @InputDirectory @Optional @PathSensitive(RELATIVE) public File getExistingMacAppBundle()
      Gets the configured existing input app bundle.
      Returns:
      existing input app bundle, or null when unset
    • setExistingMacAppBundle

      public void setExistingMacAppBundle(String existingMacAppBundle)
      Sets an existing input app bundle path.
      Parameters:
      existingMacAppBundle - path to existing app bundle
    • setExistingMacAppBundle

      public void setExistingMacAppBundle(File existingMacAppBundle)
      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

      @Input @Optional public String getMacAppIcon()
      Gets the configured mac app icon path.
      Returns:
      icon path, or null when unset
    • setMacAppIcon

      public void setMacAppIcon(String macAppIcon)
      Sets the configured mac app icon path.
      Parameters:
      macAppIcon - icon path
    • getProjectVersion

      @Input public String getProjectVersion()
      Gets the project version.
      Returns:
      project version
    • setProjectVersion

      public void setProjectVersion(String projectVersion)
      Sets the project version.
      Parameters:
      projectVersion - project version
    • getAppNameProperty

      @Internal public org.gradle.api.provider.Property<String> getAppNameProperty()
      Returns the app name property.
      Returns:
      app name property
    • getMacAppIconProperty

      @Internal public org.gradle.api.provider.Property<String> getMacAppIconProperty()
      Returns the mac app icon property.
      Returns:
      mac app icon property
    • getProjectVersionProperty

      @Internal public org.gradle.api.provider.Property<String> 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
    • getSignedAndNotarizedMacApp

      @OutputDirectory public File getSignedAndNotarizedMacApp()
      Returns the signed and notarized app bundle directory.
      Returns:
      signed app directory
    • getNotarizedDMG

      @OutputFile public File getNotarizedDMG()
      Returns the notarized DMG output file.
      Returns:
      notarized DMG file
    • getSignedAndNotarizedMacAppTarGz

      @Internal public File getSignedAndNotarizedMacAppTarGz()
      Gets the signed app tar.gz archive path.
      Returns:
      signed app archive file
    • taskAction

      public void taskAction()
      The execution of the task.