Create Gradle offline test package

Use case is this:

I have created a gradle project and test in my local successfully. Now I would like to test it in server and the server doesn’t have internet connection. How do I do?