This dialog lets you create a run/debug configuration for the selected Gradle task. It appears when you right-click the task in the Gradle tool window and select Create [task-name].
This field shows the name of your Gradle project and the Gradle task that you have selected in the Gradle tool window for the configuration.
Select this check box to make the run/debug configuration available to other team members.
If the directory-based project format is used, the settings for a run/debug configuration are stored in a separate .xml file in the .idea\runConfigurations folder if the run/debug configuration is shared, or in the .idea\workspace.xml file otherwise.
If the file-based format is used, the settings are stored in the .ipr file for shared configurations, or in the .iws file otherwise.
This check box is not available when editing the run/debug configuration defaults.
Single instance only
If this check box is selected, this run/debug configuration cannot be launched more than once.
Every time a new run/debug configuration is launched, IntelliJ IDEA checks the presence of the other instances of the same run/debug configuration, and displays a confirmation dialog box. If you click OK in the confirmation dialog box, the first instance of the runner will be stopped, and the next one will take its place.
This makes sense when the usage of certain resources can cause conflicts, or when launching two run/debug configurations of the same type consumes too much of the CPU and memory resources.
If this check box is not selected, it is possible to launch as many instances of the runner as required. So doing, each runner will start in its own tab of the Run tool window.
Use this field to specify the location of your Gradle project. You can either enter it manually or click the Browse button and point to the desired location in the dialog that opens. You can also click button to select an available Gradle module from the list of registered Gradle modules in your existing IntelliJ IDEA project. The list has a tree structure that might be useful if you have a Gradle multi-module project.
This field shows the selected Gradle task. You can add other tasks to the selected one. Use spaces to separate one task from another.
Use this field to specify VM options for your Gradle project.
If you need more room to type, click next to the field to access the VM options dialog where the text entry area is larger.
When specifying JVM options, follow these rules:
Use spaces to separate individual options, for example, -client -ea -Xmx1024m.
If an option includes spaces, enclose the spaces or the argument that contains spaces in double quotes, for example, some" "arg or "some arg".
If an option includes double quotes (as part of the argument), escape the double quotes using backslashes, for example, -Dmy.prop=\"quoted_value\".
You can pass environment variable values to custom Java properties. For example, if you define a variable MY_ENV_VAR, you can pass it to the foo property as follows:
Use this field as the Gradle command line to specify options for Gradle tasks. For the information on the syntax, see Gradle command line options. Please note that some of the Gradle commands options are not supported in IDE. In this case you will receive an error message indicating the problem.
Specify which tasks must be performed before applying the run/debug configuration. The specified tasks are performed in the order they appear in the list.
Click this icon to add a task to the list. Select the task to be added:
Run External tool. Select this option to run an application which is external to IntelliJ IDEA. In the dialog that opens, select the application or applications that should be run. If the necessary application is not defined in IntelliJ IDEA yet, add its definition. For more information, see Configuring Third-Party Tools andExternal Tools.
Make. Select this option to have the project or module compiled. The Make Module command will be carried out if a particular module is specified in the run/debug configuration, and the Make Project command otherwise.
If an error occurs during the compilation, IntelliJ IDEA won't attempt to start the run/debug configuration.
Make, no error check. The same as the Make option but IntelliJ IDEA will try to start the run/debug configuration irrespective of the compilation result.
Build Artifacts. Select this option to have an artifact or artifacts built. In the dialog that opens, select the artifact or artifacts that should be built.
Run Another Configuration. Select this option to have another run/debug configuration executed. In the dialog that opens, select the configuration to run.
This option is available only if you have already at least one run/debug configuration in the current project.
Run Ant target. Select this option to have an Ant target run. In the dialog that opens, select the target to be run. For more information, see Ant.
Run Grunt task. Select this option to run a Grunt task. In the Grunt task dialog box that opens, specify the Gruntfile.js where the required task is defined, select the task to execute, and specify the arguments to pass to the Grunt tool.
Specify the location of the Node.js interpreter, the parameters to pass to it, and the path to the grunt-cli package.
Run Gulp task. Select this option to run a Grunt task. In the Gulp task dialog box that opens, specify the Gulpfile.js where the required task is defined, select the task to execute, and specify the arguments to pass to the Gulp tool.
Specify the location of the Node.js interpreter, the parameters to pass to it, and the path to the gulp package.
Run npm Script. Select this check box to execute an npm script. In the NPM Script dialog box that opens, specify the package.json file where the required script is defined, select the script to execute, choose the command to apply to it, and specify the arguments to execute the script with.
Specify the location of the Node.js interpreter and the parameters to pass to it.
If the Check errors checkbox is selected, the compiler will show all the errors and the run configuration will not start.
If the Check errors checkbox is cleared, the compiler will show all the detected errors but the run configuration still will be launched.
Generate CoffeeScript Source Maps. Select this option to have the source maps for your CoffeeScript sources generated. In the dialog that opens, specify where your CoffeeScript source files are located. For more information, see CoffeeScript.
Run Maven Goal. Select this option to have a Maven goal run. In the dialog that opens, select the goal to be run.