How to print task name in gradle?

I have a question about gradle. I'am a newbie in this build system and want to know about how to print task name or save it in a variable. Something like this: > gradle someTask someTask i th...