concept custom task in category sbt

appears as: custom tasks, custom task
sbt in Action

This is an excerpt from Manning's book sbt in Action.

In sbt, it’s easy to add a custom task to a build, and if you use it in more than one place, it’s relatively easy to add a plugin that can be used from more than one place. Configuration and tasks are defined using a combination of declaration and standard Scala code. As an example, you’ll define a task in sbt that takes the output of a shell command and retrieves the first line:

The last thing you’d like to do in your release script is to make sure that there are no local Git changes before releasing. You can do this by adding a new custom task that will perform the check and then adding it into the release script. First you’ll create the custom task that will check for local index changes. Add the following to your release.sbt file: