What if you didn't have .m2
local repository?
mavenLocal()
actually adds your .m2
to your Gradle repositories.
Gradle has its own ivy cache, and probably when you migrated the project or had a different project that used some common dependencies, its actually faster as all the dependencies been downloaded already before, therefore adding maven local repo to Gradle repositories
makes the fresh project faster as it doesn't need to download them again to its local cache.
I would personally have it there as I have some maven and some Gradle projects, and yes it speeds up the build, and it doesn't use as much space to store duplicated dependencies for multiple projects. But I also think that if you are not using maven, you should let Gradle manage its dependencies.