Groovy Documentation

org.gradle.api.file
Interface CopySourceSpec


interface CopySourceSpec

Specifies sources for a file copy

author:
Steve Appling


Method Summary
CopySourceSpec from(java.lang.Object sourcePaths)

Specifies source files or directories for a copy.

CopySourceSpec from(java.lang.Object sourcePath, Closure c)

Specifies the source for a copy and creates a child CopySourceSpec.

 

Method Detail

from

public CopySourceSpec from(java.lang.Object sourcePaths)
Specifies source files or directories for a copy. The toString() method of each sourcePath is used to get a path. The paths are evaluated like org.gradle.api.Project#file(Object) Project.file(). Relative paths will be evaluated relative to the project directory.
param:
sourcePaths Paths to source directories for the copy


from

public CopySourceSpec from(java.lang.Object sourcePath, Closure c)
Specifies the source for a copy and creates a child CopySourceSpec. SourcePath.toString is used as the path. The source is set on the child CopySourceSpec, not on this one. This may be a path to a single file to copy or to a directory. If the path is to a directory, then the contents of the directory will be copied. The paths are evaluated like org.gradle.api.Project#file(Object) Project.file().
param:
sourcePath Path to source for the copy
param:
c closure for configuring the child CopySourceSpec


 

Groovy Documentation