com.neva.gradle.fork.config / SourceTargetConfig

SourceTargetConfig

class SourceTargetConfig : Config

Represents a set of action (configuration) that operates on files copied from one path to another.

Constructors

<init>

SourceTargetConfig(forkExtension: ForkExtension, name: String)

Represents a set of action (configuration) that operates on files copied from one path to another.

Properties

sourcePath

val sourcePath: String

targetPath

val targetPath: String

Inherited Properties

definedProperties

val definedProperties: List<Property>

executableFiles

var executableFiles: MutableList<String>

fork

val fork: ForkExtension

name

val name: String

project

val project: Project

propsFile

var propsFile: File!

sourceDir

val sourceDir: File

sourceTree

val sourceTree: FileTree

targetDir

val targetDir: File

targetTree

val targetTree: FileTree

templateDir

var templateDir: File

templateEngine

val templateEngine: TemplateEngine

textFiles

var textFiles: MutableList<String>

textIgnoredFiles

var textIgnoredFiles: MutableList<String>

Inherited Functions

action

fun action(executor: Action<in ActionRule>): Unit
fun action(validator: Action<in ActionRule>, executor: Action<in ActionRule>): Unit

cloneFiles

fun cloneFiles(): Unit
fun cloneFiles(configurer: Action<in CloneFilesRule>): Unit

copyTemplateFile

fun copyTemplateFile(templateName: String): Unit
fun copyTemplateFile(templateName: String, targetName: String): Unit

copyTemplateFiles

fun copyTemplateFiles(files: Map<String, String>): Unit

eachFiles

fun eachFiles(action: Action<in FileHandler>): Unit
fun eachFiles(action: Action<in FileHandler>, options: Action<in EachFilesRule>): Unit
fun eachFiles(includes: List<String>, excludes: List<String>, action: Action<in FileHandler>): Unit

eachTextFiles

fun eachTextFiles(action: Action<in FileHandler>): Unit
fun eachTextFiles(pattern: String, action: Action<in FileHandler>): Unit
fun eachTextFiles(patterns: List<String>, action: Action<in FileHandler>): Unit

evaluate

fun evaluate(): Unit

execute

fun execute(): Unit

makeFilesExecutable

fun makeFilesExecutable(includes: List<String> = executableFiles, excludes: List<String> = listOf()): Unit

moveFile

fun moveFile(from: String, to: String): Unit

moveFiles

fun moveFiles(movements: Map<String, String>): Unit

promptProp

fun promptProp(prop: String, defaultProvider: () -> String?): () -> String
fun promptProp(prop: String): () -> String

promptTemplate

fun promptTemplate(template: String): () -> String

removeEmptyDirs

fun removeEmptyDirs(): Unit

removeFile

fun removeFile(path: String): Unit

removeFiles

fun removeFiles(includes: List<String>, excludes: List<String> = listOf(), cleanEmptyDirs: Boolean = true): Unit

removeText

fun removeText(removal: String): Unit

removeTexts

fun removeTexts(removals: List<String>): Unit

renderTemplate

fun renderTemplate(template: String): String

replaceContent

fun replaceContent(search: String, replace: String): Unit

replaceContents

fun replaceContents(replacements: Map<String, String>): Unit

replaceText

fun replaceText(search: String, replace: String): Unit

replaceTexts

fun replaceTexts(replacements: Map<String, String>): Unit
fun replaceTexts(replacements: Map<String, String>, configurer: Action<in ReplaceContentsRule>): Unit

toString

open fun toString(): String

validate

fun validate(): Unit