How To Create a Custom Configuration in the IDE¶
This chapter explains how to create a new Configuration in all the supported IDEs.
The creation of a new Configuration with Android Studio / IntelliJ IDEA is done as follows:
- Click on Run > Edit Configurations….
- Click on + and Select Gradle.
- Fill the name of the new Configuration in the Name field.
- Add a task and a property if needed in the
Run
dialog, for examplerunOnSimulator -Pdebug.mode=true
.
![Configuration Creation in IntelliJ IDEA](../../_images/intellij-run-configuration.png)
Configuration Creation in IntelliJ IDEA¶
- Click on OK.
- Select the newly created Configuration in the drop-down list in the Navigation bar and click on the run button to launch it.
![Navigation bar in IntelliJ IDEA](../../_images/intellij-navigation-bar.png)
Navigation bar in IntelliJ IDEA¶
- The Configuration can also be launched by double-clicking on it in the Gradle tasks view.
![Gradle view in IntelliJ IDEA](../../_images/intellij-gradle-view.png)
Gradle view in IntelliJ IDEA¶
The creation of a new Configuration with Eclipse is done as follows:
- Click on Run > Run Configurations….
- Right-click on Gradle Task and click on New Configuration.
- Fill the name of the new Configuration in the Name field.
- Add a task’s name in the
Gradle Tasks
tab, for examplerunOnSimulator
.
![Configuration Gradle Tasks tab in Eclipse](../../_images/eclipe-run-configuration-gradle-tasks.png)
Configuration Gradle Tasks tab in Eclipse¶
- Go to the
Project Settings
tab. - Check
Override project settings
. - Add a property as a Program Argument if needed, for example
-Pdebug.mode=true
.
![Configuration Project Settings tab in Eclipse](../../_images/eclipe-run-configuration-project-settings.png)
Configuration Project Settings tab in Eclipse¶
- Click on Run to launch the Configuration.