Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.tasks
Class Copy

    java.lang.Object
      org.gradle.api.internal.AbstractTask
          org.gradle.api.DefaultTask
              org.gradle.api.internal.ConventionTask
                  org.gradle.api.tasks.AbstractCopyTask
                      org.gradle.api.tasks.Copy

All Implemented Interfaces:
  Comparable<Task>, ContentFilterable, CopyProcessingSpec, CopySourceSpec, CopySpec, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.file.copy.CopySpecSource, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, Task, PatternFilterable, org.gradle.util.Configurable<Task>

    public class Copy

extends AbstractCopyTask

Copies files into a destination directory. This task can also rename and filter files as it copies. The task implements `CopySpec` for specifying what to copy.

Examples:

     task mydoc(type:Copy) {
        from 'src/main/doc'
        into 'build/target/doc'
     }

     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'
     }

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
`Copy()`

Method Summary
`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.

Methods inherited from class org.gradle.api.tasks.AbstractCopyTask
`copy, eachFile, eachFile, exclude, exclude, exclude, exclude, expand, filter, filter, filter, from, from, getDefaultSource, getDirMode, getExcludes, getFileMode, getIncludes, getMainSpec, getRootSpec, getSource, include, include, include, include, into, into, isCaseSensitive, rename, rename, rename, setCaseSensitive, setDirMode, setExcludes, setFileMode, setIncludes, with`

Methods inherited from class org.gradle.api.internal.ConventionTask
`conventionMapping, getConventionMapping, setConventionMapping`

Methods inherited from class org.gradle.api.internal.AbstractTask
`captureStandardOutput, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, disableStandardOutputCapture, doFirst, doFirst, doLast, doLast, equals, execute, getActions, getAdditionalProperties, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getDynamicObjectHelper, getEnabled, getExecuter, getGroup, getInputs, getLogger, getLogging, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getStandardOutputCapture, getState, getTaskDependencies, getTemporaryDir, hashCode, hasProperty, injectIntoNewInstance, isEnabled, leftShift, onlyIf, onlyIf, property, setActions, setConvention, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setGroup, setName, setOnlyIf, setOnlyIf, setProject, setProperty, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Copy

    public Copy()

Method Detail

### configureRootSpec

    protected void configureRootSpec()

  Overrides:
    `configureRootSpec` in class `AbstractCopyTask`

### getCopyAction

    public org.gradle.api.internal.file.copy.FileCopyActionImpl getCopyAction()

  Specified by:
    `getCopyAction` in class `AbstractCopyTask`

### setCopyAction

    public void setCopyAction(org.gradle.api.internal.file.copy.FileCopyActionImpl copyAction)

### getDestinationDir

    public File getDestinationDir()

  Returns the directory to copy files into.

  Returns:
    The destination dir.

### setDestinationDir

    public void setDestinationDir(File destinationDir)

  Sets the directory to copy files into. This is the same as calling `AbstractCopyTask.into(Object)` on this task.

  Parameters:
    `destinationDir` - The destination directory. Must not be null.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD