jetbrains.buildServer.configs.kotlin.v2018_1.buildFeatures / FileContentReplacer

FileContentReplacer

open class FileContentReplacer : BuildFeature

A build feature which processes text files by performing regular expressions

See Also

replaceContent

Types

FileEncoding

enum class FileEncoding

File Encoding

RegexMode

enum class RegexMode

Controls the way the search pattern and the replacement text are interpreted.

Constructors

<init>

FileContentReplacer(init: FileContentReplacer.() -> Unit)FileContentReplacer()

A build feature which processes text files by performing regular expressions

Properties

caseSensitivePattern

var caseSensitivePattern: Boolean?

Whether the search should be case-sensitive. Enabled by default. A value of false sets CASE_INSENSITIVE and UNICODE_CASE flags. Set to false for case-insensitive languages (e.g. Visual Basic).

customEncodingName

var customEncodingName: String?

A name of the custom encoding to use, works when encoding is set to FileEncoding.CUSTOM

encoding

var encoding: FileEncoding?

A file encoding to use

failBuildIfNoFilesMatchPattern

var failBuildIfNoFilesMatchPattern: Boolean?

Enables/disables build failure in case there are no files matching the specified file pattern. Enabled by default.

fileRules

var fileRules: String?

Comma- or newline-separated set of rules in the form of +|-:[path relative to the checkout directory], wildcards are supported

pattern

var pattern: String?

Pattern to search for, either in the regular expression (default) or in the fixed strings format, depending on the regexMode.

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.

replacement

var replacement: String?

Replacement text. In REGEX mode, $N sequence references N-th capturing group. All backslashes (\) and dollar signs ($) without a special meaning should be quoted (as \\ and \$, respectively). In REGEX_MIXED and FIXED_STRINGS modes, backslashes (\) and dollar signs ($) have no special meaning.

Inherited Properties

enabled

var enabled: Boolean

Specifies whether the feature is enabled, true by default

id

var id: String?

Build feature id, if not specified will be generated

type

var type: String

Build feature type

Functions

validate

open fun validate(consumer: ErrorConsumer): Unit

Validates this object and reports found errors to the provided consumer

Inherited Functions

create

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.

toString

open fun toString(): String