Class CommonScriptContext

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getScript() Script content.
      String getName() Hook name.
      Unit appendScript(Function0<String> script) Appends the result of the provided function to the existing script.
      final 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.
      • 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.

      • from

         final 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.