According to https://developer.android.com/studio/build/building-cmdline, to build and install the app I should run
./gradlew installDebug
but this only installs the app.
The way to launch it programatically is listed here https://stackoverflow.com/a/4567928 with
adb shell am start -n com.package.name/com.package.name.ActivityName
is there a way to build, install and launch with gradle? Why there's no task for this?