Groovy Documentation

org.gradle.api.tasks
[Java] Class Sync

java.lang.Object
  org.gradle.api.internal.ConventionTask
      org.gradle.api.tasks.AbstractCopyTask
          org.gradle.api.tasks.Sync

public class Sync
extends AbstractCopyTask

Synchronises the contents of a destination directory with some source directories and files.


Method Summary
protected CopyAction createCopyAction()

protected CopySpecInternal createRootSpec()

File getDestinationDir()

Returns the directory to copy files into.

DestinationRootCopySpec getRootSpec()

void setDestinationDir(File destinationDir)

Sets the directory to copy files into.

 
Methods inherited from class AbstractCopyTask
configureRootSpec, copy, createCopyAction, createRootSpec, eachFile, eachFile, exclude, exclude, exclude, exclude, expand, filesMatching, filesNotMatching, filter, filter, filter, from, from, getDefaultSource, getDirMode, getDuplicatesStrategy, getExcludes, getFileMode, getIncludeEmptyDirs, getIncludes, getMainSpec, getRootSpec, getSource, include, include, include, include, into, into, isCaseSensitive, rename, rename, rename, setCaseSensitive, setDirMode, setDuplicatesStrategy, setExcludes, setFileMode, setIncludeEmptyDirs, setIncludes, with
 

Method Detail

createCopyAction

@Override
protected CopyAction createCopyAction()


createRootSpec

@Override
protected CopySpecInternal createRootSpec()


getDestinationDir

@OutputDirectory
public File getDestinationDir()
Returns the directory to copy files into.
Returns:
The destination dir.


getRootSpec

@Override
public DestinationRootCopySpec getRootSpec()


setDestinationDir

public void setDestinationDir(File destinationDir)
Sets the directory to copy files into. This is the same as calling into(Object) on this task.
Parameters:
destinationDir - The destination directory. Must not be null.


 

Gradle API 1.8