Class CommonScriptContext
-
- All Implemented Interfaces:
-
org.danilopianini.gradle.git.hooks.ScriptContext
public class CommonScriptContext extends AbstractScriptContext
Implements a Script DSL valid for any hook.
-
-
Constructor Summary
Constructors Constructor Description CommonScriptContext(String name)
-
Method Summary
Modifier and Type Method Description final StringgetScript()Script content. StringgetName()Hook name. UnitappendScript(Function0<String> script)Appends the result of the provided function to the existing script. final Unitfrom(String shebang, Function0<String> script)Generates a script with either the provided shebang or with a shebang invoking bash, and with the result of the provided function. -
Methods inherited from class org.danilopianini.gradle.git.hooks.ScriptContext
from, from, from, tasks, tasks, tasks -
Methods inherited from class org.danilopianini.gradle.git.hooks.AbstractScriptContext
tasks -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CommonScriptContext
CommonScriptContext(String name)
-
-
Method Detail
-
getScript
final String getScript()
Script content. To be fetched only when the configuration is complete.
-
appendScript
Unit appendScript(Function0<String> script)
Appends the result of the provided function to the existing script.
-
-
-
-