Re: [sbt] Custom tasks don't show up with "sbt tasks" listing

34 views
Skip to first unread message

Mark Harrah

unread,
Apr 12, 2013, 9:07:15 AM4/12/13
to simple-b...@googlegroups.com
On Thu, 11 Apr 2013 10:08:31 -0700 (PDT)
Cosmin Lehene <cle...@gmail.com> wrote:

> Hi,
>
> Is there a way to have the custom tasks listed when running "sbt tasks"?

The default is to not show up on the first screen to avoid it getting flooded with minor tasks from plugins. You can use tasks -v to see more. (See also `help tasks`).

The whole mechanism is rather raw, so it isn't documented, but it is straightforward to change this for a task. There is a variation on TaskKey with essentially this signature:

def TaskKey[T](label: String, description: String = "", rank: Int = <...>): TaskKey[T] =

The rank controls how many -v arguments to `tasks` are required to see it. Specify KeyRanks.ATask for the rank to have it show up in the first screen of tasks. You can use BTask for less important tasks.

-Mark


> Thanks,
> Cosmin
>
> --
> You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-t...@googlegroups.com.
> To post to this group, send email to simple-b...@googlegroups.com.
> Visit this group at http://groups.google.com/group/simple-build-tool?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Reply all
Reply to author
Forward
0 new messages