|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
de.undercouch.gradle.tasks.download.Verify
public class Verify
Verifies a file's integrity by calculating its checksum.
task verifyFile(type: Verify) {
file new File(buildDir, "myfile.txt")
algorithm 'MD5'
checksum '694B2863621FCDBBBA2777BF329C056C' // expected checksum (hex)
}
| 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_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE |
| Constructor Summary | |
|---|---|
Verify()
Default constructor |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class org.gradle.api.internal.AbstractTask |
|---|
addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getImpliesSubProjects, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setName, setOnlyIf, setOnlyIf, setProject, setProperty, setShouldRunAfter, shouldRunAfter, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Verify()
| Method Detail |
|---|
public void verify()
throws java.io.IOException,
java.security.NoSuchAlgorithmException
java.io.IOException - if the file could not be verified
java.security.NoSuchAlgorithmException - if the given algorithm is not availablepublic void src(java.lang.Object src)
VerifySpec
src in interface VerifySpecsrc - the file (either a filename or a File object)public void algorithm(java.lang.String algorithm)
VerifySpec
algorithm in interface VerifySpecalgorithm - the name of the algorithmpublic void checksum(java.lang.String checksum)
VerifySpec
checksum 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||