How to use Maven Local repository for gradle build

Also, can’t you do this by setting the project to run in offline mode?