Agreed.  At the risk of putting words in the developers' mouths, task groups 
are but one part of a general output to improve the utility of the -t listing.

Here's at least one issue you can follow.  I'll have more coming soon enough 
and will post them here as well since it seems to be a topic with plenty of 
interest.

        http://jira.codehaus.org/browse/GRADLE-1059

- Chris


On Jul 30, 2010, at 11:31 AM, Hamlet D'Arcy wrote:

> I would love to see more control over the -t output.
> 
> In Ant, it is quite easy to control the ant -p output... if the target
> has a description then it appears in this list, if not then it won't.
> Using this simple rule it was easy to create self documenting Ant
> builds.
> 
> I do not know how to do this yet with Gradle. Just the fact that I use
> the Java plugin means that the -t output produces too much noise,
> making it useless. The end user only ever runs 2 or 3 tasks... but
> you'd never know this from the -t output.
> 
> -- 
> Hamlet D'Arcy
> [email protected]
> 
> 
> 
> On Fri, Jul 30, 2010 at 11:27 AM, Chris Beams <[email protected]> wrote:
>> This is currently not possible.  I'll leave any further comment to Adam.
>> - C
>> On Jul 30, 2010, at 11:26 AM, [email protected] wrote:
>> 
>> And how does one filter out ?
>> 
>> That -t will display ONLY:
>> 
>> Interesting tasks
>> 
>> 
>> 
>> -----------------
>> 
>> 
>> 
>> :foo
>> 
>> 
>> 
>>    :ancillary
>> 
>> 
>> -----Original Message-----
>> From: Chris Beams <[email protected]>
>> To: user <[email protected]>
>> Sent: Fri, Jul 30, 2010 11:20 am
>> Subject: Re: [gradle-user] Re: How to remove a task
>> 
>> I was probably a bit too terse in my earlier response.  -t will display
>> *all*
>> 
>> 
>> groups, and existing gradle-provided tasks have, as far as I know, all been
>> 
>> 
>> updated with group names.
>> 
>> 
>> 
>> 
>> 
>> To demonstrate, just add "apply plugin: 'java'" to the script below.  It
>> 
>> 
>> produces the following output:
>> 
>> 
>> 
>> 
>> 
>> Root Project
>> 
>> 
>> ------------------------------------------------------------
>> 
>> 
>> 
>> 
>> 
>> Build tasks
>> 
>> 
>> -----------
>> 
>> 
>> :assemble - Builds all Jar, War, Zip, and Tar archives. [:jar]
>> 
>> 
>> :build - Assembles and tests this project. [:assemble, :check]
>> 
>> 
>> :buildDependents - Assembles and tests this project and all projects that
>> depend
>> 
>> 
>> on it. [:build]
>> 
>> 
>> :buildNeeded - Assembles and tests this project and all projects it depends
>> on.
>> 
>> 
>> [:build]
>> 
>> 
>> :classes - Assembles the main classes.
>> 
>> 
>>    :compileJava - Compiles the main Java source.
>> 
>> 
>>    :processResources - Processes the main resources.
>> 
>> 
>> :clean - Deletes the build directory.
>> 
>> 
>> :jar - Generates a jar archive with all the compiled classes. [:classes]
>> 
>> 
>> :testClasses - Assembles the test classes. [:classes]
>> 
>> 
>>    :compileTestJava - Compiles the test Java source.
>> 
>> 
>>    :processTestResources - Processes the test resources.
>> 
>> 
>> 
>> 
>> 
>> Documentation tasks
>> 
>> 
>> -------------------
>> 
>> 
>> :javadoc - Generates the javadoc for the source code. [:classes]
>> 
>> 
>> 
>> 
>> 
>> Interesting tasks
>> 
>> 
>> -----------------
>> 
>> 
>> :foo
>> 
>> 
>>    :ancillary
>> 
>> 
>> 
>> 
>> 
>> Verification tasks
>> 
>> 
>> ------------------
>> 
>> 
>> :check - Runs all checks. [:test]
>> 
>> 
>> :test - Runs the unit tests. [:classes, :testClasses]
>> 
>> 
>> 
>> 
>> 
>> Rules
>> 
>> 
>> -----
>> 
>> 
>> Pattern: build<ConfigurationName>: Builds the artifacts belonging to a
>> 
>> 
>> configuration.
>> 
>> 
>> Pattern: upload<ConfigurationName>: Uploads the project artifacts of a
>> 
>> 
>> configuration to a public Gradle repository.
>> 
>> 
>> Pattern: clean<TaskName>: Cleans the output files of a task.
>> 
>> 
>> 
>> 
>> 
>> BUILD SUCCESSFUL
>> 
>> 
>> 
>> 
>> 
>> Total time: 0.862 secs
>> 
>> 
>> 
>> 
>> 
>> On Jul 30, 2010, at 11:15 AM, Hamlet D'Arcy wrote:
>> 
>> 
>> 
>> 
>> 
>>> How does -t know only to display the tasks in the Interesting Group?
>> 
>> 
>>> 
>> 
>> 
>>> --
>> 
>> 
>>> Hamlet D'Arcy
>> 
>> 
>>> [email protected]
>> 
>> 
>>> 
>> 
>> 
>>> 
>> 
>> 
>>> 
>> 
>> 
>>> On Fri, Jul 30, 2010 at 10:53 AM, Chris Beams <[email protected]> wrote:
>> 
>> 
>>>> There is some work going on to this end in trunk.
>> 
>> 
>>>> 
>> 
>> 
>>>> Tasks now have a 'group'.  Consider the following build.gradle
>> 
>> 
>>>> 
>> 
>> 
>>>>       task foo(dependsOn: 'ancillary') {
>> 
>> 
>>>>               group = 'Interesting'
>> 
>> 
>>>>       }
>> 
>> 
>>>> 
>> 
>> 
>>>>       task ancillary {
>> 
>> 
>>>>               // no group assignment
>> 
>> 
>>>>       }
>> 
>> 
>>>> 
>> 
>> 
>>>> 
>> 
>> 
>>>> cbe...@anakata:/tmp>$ gradle -t
>> 
>> 
>>>> :report
>> 
>> 
>>>> 
>> 
>> 
>>>> ------------------------------------------------------------
>> 
>> 
>>>> Root Project
>> 
>> 
>>>> ------------------------------------------------------------
>> 
>> 
>>>> 
>> 
>> 
>>>> Interesting tasks
>> 
>> 
>>>> -----------------
>> 
>> 
>>>> :foo
>> 
>> 
>>>>   :ancillary
>> 
>> 
>>>> 
>> 
>> 
>>>> BUILD SUCCESSFUL
>> 
>> 
>>>> 
>> 
>> 
>>>> Total time: 0.478 secs
>> 
>> 
>>>> 
>> 
>> 
>>>> 
>> 
>> 
>>>> If you like, just update your gradle-wrapper.properties to read as
>>>> follows:
>> 
>> 
>>>> 
>> 
>> 
>>>>       distributionVersion=0.9-20100729113141+0200
>> 
>> 
>>>> 
>> 
>> 
>>>> and you can try these changes out.
>> 
>> 
>>>> 
>> 
>> 
>>>> - C
>> 
>> 
>>>> 
>> 
>> 
>>>> 
>> 
>> 
>>>> 
>> 
>> 
>>>> On Jul 30, 2010, at 10:42 AM, Hamlet D'Arcy wrote:
>> 
>> 
>>>> 
>> 
>> 
>>>>> It would be enough to simply hide certain tasks from the -t output.
>> 
>> 
>>>>> Some tasks I would like to leave in the project but hide from the -t
>> 
>> 
>>>>> output.
>> 
>> 
>>>>> 
>> 
>> 
>>>>> --
>> 
>> 
>>>>> Hamlet D'Arcy
>> 
>> 
>>>>> [email protected]
>> 
>> 
>>>>> 
>> 
>> 
>>>>> 
>> 
>> 
>>>>> 
>> 
>> 
>>>>> On Fri, Jul 30, 2010 at 10:03 AM, Hamlet D'Arcy <[email protected]>
>>>>> wrote:
>> 
>> 
>>>>>> Hi all,
>> 
>> 
>>>>>> 
>> 
>> 
>>>>>> I am using the Java plugin, but I do not want all the tasks present.
>> 
>> 
>>>>>> For instance, I have no need for "jar".
>> 
>> 
>>>>>> 
>> 
>> 
>>>>>> How can I remove the jar task? It clutters up the output of "gradle -t"
>> 
>> 
>>>>>> 
>> 
>> 
>>>>>> I don't see an API on TaskCollection to do this.
>> 
>> 
>>>>>> 
>> 
>> 
>>>>>> --
>> 
>> 
>>>>>> Hamlet D'Arcy
>> 
>> 
>>>>>> [email protected]
>> 
>> 
>>>>>> 
>> 
>> 
>>>>> 
>> 
>> 
>>>>> ---------------------------------------------------------------------
>> 
>> 
>>>>> To unsubscribe from this list, please visit:
>> 
>> 
>>>>> 
>> 
>> 
>>>>>   http://xircles.codehaus.org/manage_email
>> 
>> 
>>>>> 
>> 
>> 
>>>>> 
>> 
>> 
>>>> 
>> 
>> 
>>>> 
>> 
>> 
>>>> ---------------------------------------------------------------------
>> 
>> 
>>>> To unsubscribe from this list, please visit:
>> 
>> 
>>>> 
>> 
>> 
>>>>   http://xircles.codehaus.org/manage_email
>> 
>> 
>>>> 
>> 
>> 
>>>> 
>> 
>> 
>>>> 
>> 
>> 
>>> 
>> 
>> 
>>> ---------------------------------------------------------------------
>> 
>> 
>>> To unsubscribe from this list, please visit:
>> 
>> 
>>> 
>> 
>> 
>>>   http://xircles.codehaus.org/manage_email
>> 
>> 
>>> 
>> 
>> 
>>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> 
>> 
>> To unsubscribe from this list, please visit:
>> 
>> 
>> 
>> 
>> 
>>    http://xircles.codehaus.org/manage_email
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to