api / org.gradle.jvm.application.scripts / TemplateBasedScriptGenerator

TemplateBasedScriptGenerator

@Incubating interface TemplateBasedScriptGenerator : ScriptGenerator

Interface for generating scripts with the provided details based on a provided template.

Functions

getTemplate

abstract fun getTemplate(): TextResource

Gets the template reader used for generating script.

setTemplate

abstract fun setTemplate(template: TextResource): Unit

Sets the template text resource used for generating script.

Inherited Functions

generateScript

abstract fun generateScript(details: JavaAppStartScriptGenerationDetails, destination: Writer): Unit

Generate the script.

Implementations should not close the given writer. It is the responsibility of the caller to close the stream.