StigPatchSpec
data class StigPatchSpec(val file: File, val find: String, val replace: String, val regex: Boolean = true, val skipIfContains: String? = null, val required: Boolean = true, val description: String? = null, val replaceFromFile: File? = null)
Specification for a single source-code patch.
Two ways to specify the replacement text:
replace: inline replacement string (supports regex backreferences)
replaceFromFile: a resolved File whose content is read at task execution time and used as the replacement text. When both are set, replaceFromFile content is appended/prepended to replace depending on the pattern.
The file field is always the patch target (the resolved file to be patched).
Constructors
Properties
Link copied to clipboard
Link copied to clipboard
@get:InputFile
@get:PathSensitive(value = PathSensitivity.ABSOLUTE)
@get:Optional
Optional resolved file whose content is used as the replacement text. Read at task execution time — no configuration-time file I/O. When set, replace acts as a template where {{CONTENT}} is substituted with the file's trimmed content.
Link copied to clipboard