I have an Android project and I was running the following code to assemble an apk:
./gradlew app:assembleDebug
or this if I wanted a release version
./gradlew app:assembleRelease
I realized that Unit Tests were not being executed. After digging a little I found out that build depends on assemble and also on test and check.
When I run
./gradlew app:build
I can see both debug and release apk generated in the the output folder.
However if I run
./gradlew app:buildDebug
the output folder contains no apk files. I can see that assemble was not called when I specified the build type.
Any idea why this is? How can I use gradle to build, run tests and generate an apk in one command for a specific build type?