Why is my Android:Run task being run when I execute Desktop:Run in my libgdx project?

I am using IntelliJ IDEA 2016.2.3 (normal IDE, not Android Studio) on windows 10.
I have set up a libgdx project with android and desktop modules.
When trying to run Desktop:Run, Android:Run is also executed beforehand.
I have checked the build files in the main projects, as well as the modules Core, Android, and Desktop.
Android is not specified as a dependency of Desktop.

Weirdly, If I open a completely different project in a separate window, I can suddenly execute Desktop:Run normally.
The projects do not rely on each-other, so I am guessing that the gradle wrapper is borrowing settings from the second unrelated project when trying to execute tasks for the original project.

Completely confused here…any ideas what is going on?

How are you executing gradle? From IDEA? Does the problem also happen if you execute it from the command line?

One thing I could imagine (without knowing your concrete build setup) is that you somehow run

./gradlew run

and not

./gradlew desktop:run

the earlier would execute all available ‘run’ tasks.