How to setup gradle repository in a closed network?

I have a closed network (with to connection to the internet) and I want to create internal gradle repository in it, so all the computers in that network could work with gradle.

I didn’t find any reference to anything like that, have you heard about something like that and do you know how can I do that?


Just use binary repository.

May you please explain?

Gradle doesn’t have its own repository type, but supports many common repository types (maven, ivy, s3, etc.). You need to set up the local server with a binary repository like @kris mentioned. You’ll publish whatever artifacts that your users need there.

You can use whatever binary repository that you want for the computers in your closed network as long as Gradle supports the repository type that it exposes. Sonatype Nexus and JFrog Artifactory are two common binary repositories that expose Maven repositories (among others depending on which one). Both have an open-source version that you can use for free with the basic functionality.

Nexus OSS:

If you want to use the Gradle wrapper to get the Gradle distribution itself to your local clients, you can also put it in your binary repository.