public class Verify extends org.gradle.api.DefaultTask implements VerifySpec
task verifyFile(type: Verify) {
file new File(buildDir, "myfile.txt")
algorithm 'MD5'
checksum '694B2863621FCDBBBA2777BF329C056C' // expected checksum (hex)
}
| Constructor and Description |
|---|
Verify()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
algorithm(java.lang.String algorithm)
Set the algorithm to use to compute the checksum.
|
void |
checksum(java.lang.String checksum)
Set the actual checksum to verify against
|
java.lang.String |
getAlgorithm() |
java.lang.String |
getChecksum() |
java.io.File |
getSrc() |
void |
src(java.lang.Object src)
Sets the file to verify
|
void |
verify()
Starts verifying
|
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, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceappendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getOnlyIf, getReasonNotToTrackState, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, prependParallelSafeAction, setImpliesSubProjectspublic void verify()
throws java.io.IOException,
java.security.NoSuchAlgorithmException
java.io.IOException - if the file could not be verifiedjava.security.NoSuchAlgorithmException - if the given algorithm is not availablepublic void src(java.lang.Object src)
VerifySpecsrc in interface VerifySpecsrc - the file (either a filename or a File object)public void algorithm(java.lang.String algorithm)
VerifySpecalgorithm in interface VerifySpecalgorithm - the name of the algorithmpublic void checksum(java.lang.String checksum)
VerifySpecchecksum in interface VerifySpecchecksum - the checksum (in hex)@InputFile public java.io.File getSrc()
getSrc in interface VerifySpec@Input @Optional public java.lang.String getAlgorithm()
getAlgorithm in interface VerifySpec@Input public java.lang.String getChecksum()
getChecksum in interface VerifySpec