Any way to download only the Gradle wrapper?

Can we download only the Gradle wrapper from somewhere?

I’d like to provide a quick script for team developers to set up a new project repository directory – we often create a new project directory. The directory is expected to include a Gradle wrapper.

Unfortunately, to get the Gradle wrapper located in the directory, we need an executable Gradle already installed in the environment, IIUC. Then, the script:

  1. downloads a full set of Gradle executable.
  2. runs gradle wrapper to set up a Gradle wrapper in the new directory.
  3. runs ./gradlew there to download another Gradle executable for the Gradle wrapper in the directory…

That is wasting! If we can get only a Gradle wrapper downloaded, just one download would be okay. Can we do such download?

1 Like

Why not simply make an barebones wrapper only project yourself, zip it up, and put it on a server for download by your team?

We actually do that now, so it’s not a mandatory blocker. We wondered if we could do it without our own packages so that we can think less about licensing (it’d be published open), and less efforts to catch up with the latest versions.

I found a Maven repo of Gradle’s components, and there is org/gradle/gradle-wrapper/ :

But, we additionally needed gradle-cli to execute it. Unfortunately, only 5.6-rc-1 is available there :

Would this repository include later versions 5.6+?

1 Like