interface ContentFilterable
Represents some binary resource whose content can be filtered.
abstract fun expand(properties: MutableMap<String, *>): ContentFilterable
Expands property references in each file as it is copied. More specifically, each file is transformed using Groovy's groovy.text.SimpleTemplateEngine. This means you can use simple property references, such as |
|
abstract fun filter(properties: MutableMap<String, *>, filterType: Class<out FilterReader>): ContentFilterable
Adds a content filter to be used during the copy. Multiple calls to filter, add additional filters to the filter chain. Each filter should implement Filter properties may be specified using groovy map syntax. Examples:
abstract fun filter(filterType: Class<out FilterReader>): ContentFilterable
Adds a content filter to be used during the copy. Multiple calls to filter, add additional filters to the filter chain. Each filter should implement Examples:
abstract fun filter(closure: Closure<Any>): ContentFilterable
Adds a content filter based on the provided closure. The Closure will be called with each line (stripped of line endings) and should return a String to replace the line or abstract fun filter(transformer: Transformer<String, String>): ContentFilterable
Adds a content filter based on the provided transformer. The Closure will be called with each line (stripped of line endings) and should return a String to replace the line or |
fun <T : FilterReader> ContentFilterable.filter(vararg properties: Pair<String, Any?>): ContentFilterable fun <T : FilterReader> ContentFilterable.filter(properties: Map<String, Any?>): ContentFilterable fun <T : FilterReader> ContentFilterable.filter(filterType: KClass<T>, vararg properties: Pair<String, Any?>): ContentFilterable fun <T : FilterReader> ContentFilterable.filter(filterType: KClass<T>, properties: Map<String, Any?>): ContentFilterable
Adds a content filter to be used during the copy.
Multiple calls add additional filters to the filter chain.
Each filter should implement FilterReader.
Import |
interface CopyProcessingSpec : ContentFilterable
Specifies the destination of a copy. |
|
interface FileCopyDetails : FileTreeElement, ContentFilterable
Provides details about a file or directory about to be copied, and allows some aspects of the destination file to be modified. Using this interface, you can change the destination path of the file, filter the content of the file, or exclude the file from the result entirely. Access to the source file itself after any filters have been added is not a supported operation. |