I\'ve been dealing with gradle build time in Android Studio recently. I\'ve managed to decrease the build time from about 3 mins to 10 seconds by removing some dependencies, but
Recently I enabled multidex in my app because I had over 65k methods. Dexing is what was taking a lot of time to complete.
Go to Settings (Ctrl + alt + s) -> Build, Execution, Deployment -> Compiler
Enabling compiling modules in parallel and adding --offline
in compiler has decreased my execution time to about 15 seconds.