Interface ScriptContext
-
- All Implemented Interfaces:
public interface ScriptContextCollects the DSL elements for defining scripts.
-
-
Method Summary
Modifier and Type Method Description abstract UnitappendScript(Function0<String> script)Appends the result of the provided function to the existing script. Unitfrom(File file)Generates a script from the provided file. Unitfrom(URL url)Generates a script from the provided url. Unitfrom(String url)Generates a script from the provided url. abstract 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. Unittasks(String name, String otherNames, Boolean requireSuccess)Adds the provided tasks to the script, by invoking ./gradlew <taskname>.Unittasks(Task task, Task otherTasks, Boolean requireSuccess)Adds the provided tasks to the script, by invoking ./gradlew <taskname>.Unittasks(TaskProvider<?> task, TaskProvider<?> otherTasks, Boolean requireSuccess)Adds the provided tasks to the script, by invoking ./gradlew <taskname>.abstract Unittasks(Object first, Object others, Boolean requireSuccess)Adds the provided tasks to the script, by invoking ./gradlew <taskname>.abstract StringgetName()Hook name. abstract StringgetScript()Script content. -
-
Method Detail
-
appendScript
abstract Unit appendScript(Function0<String> script)
Appends the result of the provided function to the existing script.
-
from
abstract Unit from(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.
-
tasks
Unit tasks(String name, String otherNames, Boolean requireSuccess)
Adds the provided tasks to the script, by invoking
./gradlew <taskname>. By default, a failure of the task implies a failure of the commit. To run a task without considering the failure critical, pass[requireSuccess] = false.
-
tasks
Unit tasks(Task task, Task otherTasks, Boolean requireSuccess)
Adds the provided tasks to the script, by invoking
./gradlew <taskname>. By default, a failure of the task implies a failure of the commit. To run a task without considering the failure critical, pass[requireSuccess] = false.
-
tasks
Unit tasks(TaskProvider<?> task, TaskProvider<?> otherTasks, Boolean requireSuccess)
Adds the provided tasks to the script, by invoking
./gradlew <taskname>. By default, a failure of the task implies a failure of the commit. To run a task without considering the failure critical, pass[requireSuccess] = false.
-
tasks
abstract Unit tasks(Object first, Object others, Boolean requireSuccess)
Adds the provided tasks to the script, by invoking
./gradlew <taskname>. By default, a failure of the task implies a failure of the commit. To run a task without considering the failure critical, pass[requireSuccess] = false.
-
-
-
-