public class Copy extends AbstractCopyTask
CopySpec
for specifying what to copy.
Examples:
task mydoc(type:Copy) { from 'src/main/doc' into 'build/target/doc' } //for ant filter import org.apache.tools.ant.filters.ReplaceTokens task initconfig(type:Copy) { from('src/main/config') { include '**/*.properties' include '**/*.xml' filter(ReplaceTokens, tokens:[version:'2.3.1']) } from('src/main/config') { exclude '**/*.properties', '**/*.xml' } from('src/main/languages') { rename 'EN_US_(.*)', '$1' } into 'build/target/config' exclude '**/*.bak' includeEmptyDirs = false }
Task.Namer
TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
Constructor and Description |
---|
Copy() |
Modifier and Type | Method and Description |
---|---|
protected void |
configureRootSpec() |
org.gradle.api.internal.file.copy.FileCopyActionImpl |
getCopyAction() |
File |
getDestinationDir()
Returns the directory to copy files into.
|
void |
setCopyAction(org.gradle.api.internal.file.copy.FileCopyActionImpl copyAction) |
void |
setDestinationDir(File destinationDir)
Sets the directory to copy files into.
|
copy, eachFile, eachFile, exclude, exclude, exclude, exclude, expand, filter, filter, filter, from, from, getDefaultSource, getDirMode, getExcludes, getFileMode, getIncludeEmptyDirs, getIncludes, getMainSpec, getRootSpec, getSource, include, include, include, include, into, into, isCaseSensitive, rename, rename, rename, setCaseSensitive, setDirMode, setExcludes, setFileMode, setIncludeEmptyDirs, setIncludes, with
conventionMapping, conventionMapping, getConventionMapping
addValidator, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, executeWithoutThrowingTaskFailure, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getGroup, getInputs, getLogger, getLogging, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getStandardOutputCapture, getState, getStateInternal, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, leftShift, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setGroup, setName, setOnlyIf, setOnlyIf, setProject, setProperty, toString
protected void configureRootSpec()
configureRootSpec
in class AbstractCopyTask
public org.gradle.api.internal.file.copy.FileCopyActionImpl getCopyAction()
getCopyAction
in class AbstractCopyTask
public void setCopyAction(org.gradle.api.internal.file.copy.FileCopyActionImpl copyAction)
@OutputDirectory public File getDestinationDir()
public void setDestinationDir(File destinationDir)
AbstractCopyTask.into(Object)
on this task.destinationDir
- The destination directory. Must not be null.