I have a custom gradle task that clean, build and copy the output apk to a certain location to release the apk to my customers.
However, every time I run the custom gradle task, the run configuration of Android Studio IDE is changed to that gradle task.
This is changed as the following picture after running the task.
(In this picture I use gradle clean for example)
Thus, if I forgot to change back the configuration to default app module and ‘run (Shift + F10 in Windows)’, the task is running again unexpectedly and it struck me.
After an hour of googling, I couldn’t found a solution for this. Is there a way to prevent this behavior?