# Configure task from command line?

**URL:** <https://discuss.gradle.org/t/configure-task-from-command-line/3575>\
**Category:** Old Forum Archive\
**Created:** [June 6, 2013, 9:03am UTC](https://discuss.gradle.org/t/configure-task-from-command-line/3575 "2013-06-06T09:03:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wujek\_srujek](https://avatars.discourse-cdn.com/v4/letter/w/ee7513/32.png) [@wujek\_srujek](https://discuss.gradle.org/u/wujek_srujek)\
**Post date:** [June 6, 2013, 9:03am UTC](https://discuss.gradle.org/t/configure-task-from-command-line/3575/1 "2013-06-06T09:03:00Z")

</div>

How can I write a task that is configured from the command line, just like for example the ‘dependencies’ task is with ‘–configuration’? Is this possible for custom tasks or restricted to built-ins?

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [June 6, 2013, 1:52pm UTC](https://discuss.gradle.org/t/configure-task-from-command-line/3575/2 "2013-06-06T13:52:00Z")

</div>

Task-specific command line options such as ‘–configuration’ aren’t currently a public feature, but may become one eventually. In the meantime, the best option is to use a system property (’-D’) or project property (’-P’).
