# withArguments

abstract fun withArguments(arguments: Array<String>): T(source)

Specify the command line build arguments. Useful mostly for running tasks via .

Be aware that not all of the Gradle command line options are supported! Only the build arguments that configure the build execution are supported. They are modelled in the Gradle API via . Examples of supported build arguments: '--info', '-p'. The command line instructions that are actually separate commands (like '-?' and '-v') are not supported. Some other instructions like '--daemon' are also not supported - the tooling API always runs with the daemon.

If an unknown or unsupported command line option is specified, will be thrown at the time the operation is executed via BuildLauncher#run() or ModelBuilder#get().

For the list of all Gradle command line options please refer to the User Manual or take a look at the output of the 'gradle -?' command. Majority of arguments modeled by are supported.

The arguments can potentially override some other settings you have configured. For example, the project directory or Gradle user home directory that are configured in the . Also, the task names configured by BuildLauncher#forTasks(String...) can be overridden if you happen to specify other tasks via the build arguments.

See the example in the docs for If not configured, null, or an empty array is passed, then the reasonable default will be used.

Requires Gradle 1.0 or later.

#### Since

1.0

abstract fun withArguments(arguments: Iterable<String>): T(source)

Specify the command line build arguments. Useful mostly for running tasks via .

If not configured, null, or an empty list is passed, then the reasonable default will be used.

Requires Gradle 1.0 or later.

#### Since

2.6