AbstractScriptContext

Pre-implements tasks.

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val name: String

Hook name.

Link copied to clipboard
abstract val script: String

Script content. To be fetched only when the configuration is complete.

Functions

Link copied to clipboard
abstract fun appendScript(script: () -> String)

Appends the result of the provided function to the existing script.

Link copied to clipboard
open fun from(file: File)

Generates a script from the provided file.

open fun from(url: URL)
open fun from(url: String)

Generates a script from the provided url.

abstract fun from(shebang: String? = "#!/usr/bin/env bash", script: () -> String)

Generates a script with either the provided shebang or with a shebang invoking bash, and with the result of the provided function.

Link copied to clipboard
override fun tasks(first: Any, vararg others: Any, requireSuccess: Boolean = true)
open fun tasks(name: String, vararg otherNames: String, requireSuccess: Boolean = true)
open fun tasks(task: Task, vararg otherTasks: Task, requireSuccess: Boolean = true)
open fun tasks(task: TaskProvider<*>, vararg otherTasks: TaskProvider<*>, requireSuccess: Boolean = true)

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.