SignatureSpec
public class Sign extends DefaultTask implements SignatureSpec
The task produces Signature
The signature objects are created with defaults and using this tasks signatory and signature type.
Task.Namer
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
Constructor | Description |
---|---|
Sign() |
Modifier and Type | Method | Description |
---|---|---|
void |
generate() |
Generates the signature files.
|
protected org.gradle.api.internal.file.FileCollectionFactory |
getFileCollectionFactory() |
|
FileCollection |
getFilesToSign() |
All of the files that will be signed by this task.
|
java.lang.Iterable<java.io.File> |
getInputFiles() |
|
java.util.Map<java.lang.String,java.io.File> |
getOutputFiles() |
|
Signatory |
getSignatory() |
Returns the signatory for this signing task.
|
FileCollection |
getSignatureFiles() |
All of the signature files that will be generated by this operation.
|
DomainObjectSet<Signature> |
getSignatures() |
The signatures generated by this task.
|
SignatureType |
getSignatureType() |
The signature representation that will be created.
|
Signature |
getSingleSignature() |
Returns the single signature generated by this task.
|
boolean |
isRequired() |
Whether or not this task should fail if no signatory or signature type are configured at generation time.
|
void |
required(boolean required) |
Change whether or not this task should fail if no signatory or signature type are configured at the time of generation.
|
void |
setRequired(boolean required) |
Whether or not it is required that this signature be generated.
|
void |
setSignatory(Signatory signatory) |
Sets the signatory that will be signing the input.
|
void |
setSignatureType(SignatureType signatureType) |
Sets the signature representation that the signatures will be produced as.
|
void |
sign(java.io.File... files) |
Configures the task to sign each of the given files
|
void |
sign(java.lang.String classifier,
java.io.File... files) |
Configures the task to sign each of the given artifacts, using the given classifier as the classifier for the resultant signature publish artifact.
|
void |
sign(Configuration... configurations) |
Configures the task to sign every artifact of the given configurations
|
void |
sign(PublishArtifact... publishArtifacts) |
Configures the task to sign each of the given artifacts
|
void |
sign(Publication... publications) |
Configures the task to sign every artifact of the given publications
|
void |
sign(Task... tasks) |
Configures the task to sign the archive produced for each of the given tasks (which must be archive tasks).
|
void |
signatory(Signatory signatory) |
Changes the signatory of the signatures.
|
appendParallelSafeAction, compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getTimeout, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString
newInputDirectory, newInputFile, newOutputDirectory, newOutputFile
@PathSensitive(NAME_ONLY) @InputFiles public java.lang.Iterable<java.io.File> getInputFiles()
@OutputFiles public java.util.Map<java.lang.String,java.io.File> getOutputFiles()
public void sign(Task... tasks)
public void sign(PublishArtifact... publishArtifacts)
public void sign(java.io.File... files)
public void sign(java.lang.String classifier, java.io.File... files)
public void sign(Configuration... configurations)
@Incubating public void sign(Publication... publications)
public void signatory(Signatory signatory)
public void required(boolean required)
public void generate()
@Internal public DomainObjectSet<Signature> getSignatures()
@Internal public Signature getSingleSignature()
java.lang.IllegalStateException
- if there is not exactly one signature.@Inject protected org.gradle.api.internal.file.FileCollectionFactory getFileCollectionFactory()
@Internal public FileCollection getFilesToSign()
@Internal public FileCollection getSignatureFiles()
public SignatureType getSignatureType()
SignatureSpec
getSignatureType
in interface SignatureSpec
null
if none specified.public void setSignatureType(SignatureType signatureType)
SignatureSpec
setSignatureType
in interface SignatureSpec
signatureType
- the signature type to usepublic Signatory getSignatory()
getSignatory
in interface SignatureSpec
public void setSignatory(Signatory signatory)
SignatureSpec
setSignatory
in interface SignatureSpec
signatory
- The signatory@Input public boolean isRequired()
Defaults to true
.
isRequired
in interface SignatureSpec
public void setRequired(boolean required)
SignatureSpec
setRequired
in interface SignatureSpec
required
- Whether or not it is required that this signature be generated.SignatureSpec.isRequired()