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
|
newInputDirectory, newInputFile, newOutputDirectory, newOutputFileaddValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doFirst, doLast, doLast, doLast, execute, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toStringpublic 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)public java.io.File getSrc()
getSrc in interface VerifySpecpublic java.lang.String getAlgorithm()
getAlgorithm in interface VerifySpecpublic java.lang.String getChecksum()
getChecksum in interface VerifySpec