On 22/06/2011, at 10:49 PM, evgenyg wrote:

> Hi,
> 
> What do you think of the following feature suggestion to Gradle: being able
> to easily alias commonly repeated commands combinations. For example, I run
> *"gradle build deploy -PnoGroovy -x test -x about"* very frequently
> (lightweight build & deploy) and *"gradle clean build deploy"* less
> frequently (full build & deploy). 

This looks like something you could code up in your build script as a lifecycle 
task:

task minimalDeploy {
    dependOn assemble, deploy
    gradle.taskGraph.whenReady { graph -> if ( graph.hasTask(it) ) { 
project.noGroovy = true } }
}

To me, there's no difference between a lifecycle task, which gives a 
human-friendly name to some workflow step, and an alias, which also gives a 
human-friendly name to some workflow step. Instead of adding support for 
aliases, I'd rather improve our support for defining tasks which do more than 
just dependOn other tasks.


> 
> If I could map, say, "lightweight" or "l" to *"build deploy -PnoGroovy -x
> test -x about"* and "full" or "f" to *"clean build deploy"* in
> "build.gradle", then I could simply run "gradle lightweight" or "gradle l"
> or "gradle f". 
> 
> This is not a regular task dependency but merely a shortcut to command-line
> combinations typed, mapped as a String to some shorter command.
> 
> 
> 
> 
> -----
> Best regards,
> 
> Evgeny
> 
> evgeny-goldin.com 
> 
> --
> View this message in context: 
> http://gradle.1045684.n5.nabble.com/Aliasing-commonly-repeated-tasks-combination-tp4513918p4513918.html
> Sent from the gradle-user mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to