A set of specifications for copying files. This includes:
- source directories (multiples allowed)
- destination directory
- ANT like include patterns
- ANT like exclude patterns
- File relocating rules
- renaming rules
- content filters
CopySpecs may be nested by passing a closure to one of the from methods. The closure creates a child CopySpec and delegates methods in the closure to the child. Child CopySpecs inherit any values specified in the parent. This allows constructs like:
into('webroot') exclude('**/.svn/**') from('src/main/webapp') { include '**/*.jsp' } from('src/main/js') { include '**/*.js' }
In this example, the
into
and
exclude
specifications at the root level are inherited by the two child CopySpecs.
@author Steve Appling
@see org.gradle.api.tasks.Copy Copy Task
@see org.gradle.api.Project#copy(groovy.lang.Closure) Project.copy()