I want to build an Android Studio app (the Gradle build system), but I want to do this via the command line.
Only for MAC Users
Extending Vji's answer.
Step by step procedure:
Copy and paste this command and hit enter:
chmod +x gradlew
As Vji suggested:
./gradlew task-name
DON'T FORGOT TO ADD .(DOT) BEFORE /gradlew