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
.
- 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.
- The Configuration can also be launched by double-clicking on it in the Gradle tasks view.
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
.
- Go to the
Project Settings
tab. - Check
Override project settings
. - Add a property as a Program Argument if needed, for example
-Pdebug.mode=true
.
- Click on Run to launch the Configuration.