Custom Tasks
Automate work.
What is a Gradle Task?
A task is a unit of build work — compiling, copying files, running a tool. Custom tasks let you automate project-specific chores.
Registering a Task
Use tasks.register with the configuration-avoidance API. It is preferred over the older tasks.create because it is lazy.
tasks.register("hello") {
doLast {
println("Hello from Gradle")
}
}