ContentFilterable
AbstractArchiveTask
, AbstractCopyTask
, Copy
, Ear
, Jar
, Jar
, ProcessResources
, Sync
, Tar
, War
, Zip
public interface CopyProcessingSpec extends ContentFilterable
Modifier and Type | Method | Description |
---|---|---|
CopyProcessingSpec |
dirPermissions(Action<? super ConfigurableFilePermissions> configureAction) |
Configuration action for specifying directory access permissions.
|
CopyProcessingSpec |
eachFile(Closure closure) |
Adds an action to be applied to each file as it about to be copied into its destination.
|
CopyProcessingSpec |
eachFile(Action<? super FileCopyDetails> action) |
Adds an action to be applied to each file as it is about to be copied into its destination.
|
CopyProcessingSpec |
filePermissions(Action<? super ConfigurableFilePermissions> configureAction) |
Configuration action for specifying file access permissions.
|
java.lang.Integer |
getDirMode() |
Deprecated.
Use
getDirPermissions() instead. |
Property<ConfigurableFilePermissions> |
getDirPermissions() |
Property for querying and configuring directory access permissions.
|
java.lang.Integer |
getFileMode() |
Deprecated.
Use
getFilePermissions() instead. |
Property<ConfigurableFilePermissions> |
getFilePermissions() |
Property for querying and configuring file access permissions.
|
CopyProcessingSpec |
into(java.lang.Object destPath) |
Specifies the destination directory for a copy.
|
CopyProcessingSpec |
rename(Closure closure) |
Renames a source file.
|
CopyProcessingSpec |
rename(java.lang.String sourceRegEx,
java.lang.String replaceWith) |
Renames files based on a regular expression.
|
CopyProcessingSpec |
rename(java.util.regex.Pattern sourceRegEx,
java.lang.String replaceWith) |
Renames files based on a regular expression.
|
CopyProcessingSpec |
rename(Transformer<@Nullable java.lang.String,java.lang.String> renamer) |
Renames a source file.
|
CopyProcessingSpec |
setDirMode(java.lang.Integer mode) |
Deprecated.
Use
dirPermissions(Action) instead. |
CopyProcessingSpec |
setFileMode(java.lang.Integer mode) |
Deprecated.
Use
filePermissions(Action) instead. |
CopyProcessingSpec into(java.lang.Object destPath)
Project.file(Object)
.destPath
- Path to the destination directory for a CopyCopyProcessingSpec rename(Closure closure)
closure
- rename closureCopyProcessingSpec rename(Transformer<@Nullable java.lang.String,java.lang.String> renamer)
renamer
- rename functionCopyProcessingSpec 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'
sourceRegEx
- Source regular expressionreplaceWith
- Replacement string (use $ syntax for capture groups)CopyProcessingSpec rename(java.util.regex.Pattern sourceRegEx, java.lang.String replaceWith)
rename(String, String)
.sourceRegEx
- Source regular expressionreplaceWith
- Replacement string (use $ syntax for capture groups)@Nullable @Deprecated java.lang.Integer getFileMode()
getFilePermissions()
instead. This method is scheduled for removal in Gradle 9.0.null
means that existing
permissions are preserved. It is dependent on the copy action implementation whether these permissions
will actually be applied.null
if existing permissions should be preserved.@Deprecated CopyProcessingSpec setFileMode(@Nullable java.lang.Integer mode)
filePermissions(Action)
instead. This method is scheduled for removal in Gradle 9.0.null
means that existing
permissions are preserved. It is dependent on the copy action implementation whether these permissions
will actually be applied.mode
- The file permissions.@Nullable @Deprecated java.lang.Integer getDirMode()
getDirPermissions()
instead. This method is scheduled for removal in Gradle 9.0.null
means that existing
permissions are preserved. It is dependent on the copy action implementation whether these permissions
will actually be applied.null
if existing permissions should be preserved.@Deprecated CopyProcessingSpec setDirMode(@Nullable java.lang.Integer mode)
dirPermissions(Action)
instead. This method is scheduled for removal in Gradle 9.0.null
means that existing
permissions are preserved. It is dependent on the copy action implementation whether these permissions
will actually be applied.mode
- The directory permissions.Property<ConfigurableFilePermissions> getFilePermissions()
ConfigurableFilePermissions
.CopyProcessingSpec filePermissions(Action<? super ConfigurableFilePermissions> configureAction)
ConfigurableFilePermissions
.Property<ConfigurableFilePermissions> getDirPermissions()
ConfigurableFilePermissions
.CopyProcessingSpec dirPermissions(Action<? super ConfigurableFilePermissions> configureAction)
ConfigurableFilePermissions
.CopyProcessingSpec eachFile(Action<? super FileCopyDetails> action)
action
- The action to execute.CopyProcessingSpec eachFile(@DelegatesTo(value=FileCopyDetails.class,strategy=1) Closure closure)
FileCopyDetails
as its parameter. Actions are executed in the order
added, and are inherited from the parent spec.closure
- The action to execute.