|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CopySpec
A set of specifications for copying files. This includes:
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.
Copy Task,
Project.copy()| Method Summary | |
|---|---|
CopySpec |
exclude(java.lang.Iterable<java.lang.String> excludes)
Adds an ANT style exclude pattern. |
CopySpec |
exclude(java.lang.String... excludes)
Adds an ANT style exclude pattern. |
CopySpec |
filter(java.lang.Class<java.io.FilterReader> filterType)
Adds a content filter to be used during the copy. |
CopySpec |
filter(groovy.lang.Closure closure)
Adds a content filter based on the provided closure. |
CopySpec |
filter(java.util.Map<java.lang.String,java.lang.Object> map,
java.lang.Class<java.io.FilterReader> filterType)
Adds a content filter to be used during the copy. |
CopySpec |
from(java.lang.Object... sourcePaths)
Specifies source files or directories for a copy. |
CopySpec |
from(java.lang.Object sourcePath,
groovy.lang.Closure c)
Specifies the source for a copy and creates a child CopySourceSpec. |
CopySpec |
include(java.lang.Iterable<java.lang.String> includes)
Adds an ANT style include pattern. |
CopySpec |
include(java.lang.String... includes)
Adds an ANT style include pattern. |
CopySpec |
into(java.lang.Object destPath)
Specifies the destination directory for a copy. |
CopySpec |
remapTarget(groovy.lang.Closure closure)
Maps a source file to a different relative location under the target directory. |
CopySpec |
rename(java.lang.String sourceRegEx,
java.lang.String replaceWith)
Renames files based on a regular expression. |
CopySpec |
setExcludes(java.lang.Iterable<java.lang.String> excludes)
Set the allowable exclude patterns. |
CopySpec |
setIncludes(java.lang.Iterable<java.lang.String> includes)
Set the allowable include patterns. |
| Methods inherited from interface org.gradle.api.tasks.util.PatternFilterable |
|---|
getExcludes, getIncludes |
| Method Detail |
|---|
CopySpec from(java.lang.Object... sourcePaths)
Project.file() .
Relative paths will be evaluated relative to the project directory.
from in interface CopySourceSpecsourcePaths - Paths to source directories for the copy
CopySpec from(java.lang.Object sourcePath,
groovy.lang.Closure c)
Project.file() .
from in interface CopySourceSpecsourcePath - Path to source for the copyc - closure for configuring the child CopySourceSpecCopySpec setIncludes(java.lang.Iterable<java.lang.String> includes)
PatternFilterable.include(Iterable)
this replaces any previously defined includes.
setIncludes in interface PatternFilterableincludes - an Iterable providing new include patternsPattern FormatCopySpec setExcludes(java.lang.Iterable<java.lang.String> excludes)
PatternFilterable.exclude(Iterable)
this replaces any previously defined excludes.
setExcludes in interface PatternFilterableexcludes - an Iterable providing new exclude patternsPattern FormatCopySpec include(java.lang.String... includes)
include in interface PatternFilterableincludes - a vararg list of include patternsPattern FormatCopySpec include(java.lang.Iterable<java.lang.String> includes)
include in interface PatternFilterableincludes - a Iterable providing more include patternsPattern FormatCopySpec exclude(java.lang.String... excludes)
exclude in interface PatternFilterableexcludes - a vararg list of exclude patternsPattern FormatCopySpec exclude(java.lang.Iterable<java.lang.String> excludes)
exclude in interface PatternFilterableexcludes - a Iterable providing new exclude patternsPattern FormatCopySpec into(java.lang.Object destPath)
into in interface CopyProcessingSpecdestPath - Path to the destination directory for a Copy
CopySpec remapTarget(groovy.lang.Closure closure)
remapTarget in interface CopyProcessingSpecclosure - remap closure
CopySpec rename(java.lang.String sourceRegEx,
java.lang.String replaceWith)
Example:
rename '(.*)_OEM_BLUE_(.*)', '$1$2'would map the file 'style_OEM_BLUE_.css' to 'style.css'
rename in interface CopyProcessingSpecsourceRegEx - Source regular expressionreplaceWith - Replacement string (use $ syntax for capture groups)
CopySpec filter(java.util.Map<java.lang.String,java.lang.Object> map,
java.lang.Class<java.io.FilterReader> filterType)
Filter parameters may be specified using groovy map syntax.
Examples:
filter(HeadFilter, lines:25, skip:2)
filter(ReplaceTokens, tokens:[copyright:'2009', version:'2.3.1'])
filter in interface CopyProcessingSpecmap - map of filter parametersfilterType - Class of filter to add
CopySpec filter(java.lang.Class<java.io.FilterReader> filterType)
Examples:
filter(StripJavaComments)
filter(com.mycompany.project.CustomFilter)
filter in interface CopyProcessingSpecfilterType - Class of filter to add
CopySpec filter(groovy.lang.Closure closure)
filter in interface CopyProcessingSpecclosure - to implement line based filtering
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||