To force re-download of dependencies
To exclude a certain task from being run by gradle
Suppose you want to exclude the task
-xoption followed by the task name, i.e
javaDocin this case.
./gradlew clean build -x javaDoc
Stop a running gradle build process
Upgrade gradle wrapper to latest release version i.e 6.5
Run this inside your project folder via terminal
./gradlew wrapper --gradle-version 6.5 --distribution-type all
Make use of Build Cache to speed up your builds.
Set the below property in your global
Make your builds faster by building offline [Ref Link]
--offlineflag tells gradle to always use dependency modules from the cache, regardless if they are due to be checked again. When running offline, gradle will never attempt to access the network to perform dependency resolution. If required modules are not present in the dependency cache, build execution will fail.
Assembling develop debug at full speed:
./gradlew assembleDevelopDebug --offline
Running your unit tests at full speed:
./gradlew test --offline
Run a single unit test from the command line using the
./gradlew testDebugUnitTest --tests "*.MainPresenterTest". Use
*to avoid typing the entire package name. [Ref Link]