Groovy Documentation

org.gradle.api.file
[Java] Interface CopySpec

org.gradle.api.file.CopySpec
  org.gradle.api.file.CopySourceSpec
All Superinterfaces:
CopySourceSpec

public interface CopySpec
extends CopySourceSpec

A set of specifications for copying files. This includes:

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.
Authors:
Steve Appling
See Also:
Copy Task
Project.copy


Groovy Documentation