open class FileContentReplacer : BuildFeature
A build feature which processes text files by performing regular expressions
See Also
enum class FileEncoding
File Encoding |
|
enum class RegexMode
Controls the way the search pattern and the replacement text are interpreted. |
FileContentReplacer(init: FileContentReplacer.() -> Unit) FileContentReplacer()
A build feature which processes text files by performing regular expressions |
var caseSensitivePattern: Boolean?
Whether the search should be case-sensitive. Enabled by default.
A value of |
|
var customEncodingName: String?
A name of the custom encoding to use, works when encoding is set to FileEncoding.CUSTOM |
|
var encoding: FileEncoding?
A file encoding to use |
|
var failBuildIfNoFilesMatchPattern: Boolean?
Enables/disables build failure in case there are no files matching the specified file pattern. Enabled by default. |
|
var fileRules: String?
Comma- or newline-separated set of rules in the form of |
|
var pattern: String?
Pattern to search for, either in the regular expression (default) or in the fixed strings format, depending on the regexMode. |
|
var regexMode: RegexMode?
Controls the way the search pattern and the replacement text are interpreted. The default is RegexMode.REGEX. Set to RegexMode.FIXED_STRINGS to perform a fixed strings search. |
|
var replacement: String?
Replacement text.
In REGEX mode, |
var enabled: Boolean
Specifies whether the feature is enabled, true by default |
|
var id: String?
Build feature id, if not specified will be generated |
|
var type: String
Build feature type |
open fun validate(consumer: ErrorConsumer): Unit
Validates this object and reports found errors to the provided consumer |
open fun create(): BuildFeature
Creates an instance of this build feature via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor. |
|
open fun toString(): String |