This message was deleted.
# community-support
s
This message was deleted.
d
It's just the md5 of the distribution URL
Copy code
❯ ruby distribution_path.rb https\://services.gradle.org/distributions-snapshots/gradle-7.5-20220113070244+0000-bin.zip
/Users/dannyt/.gradle/wrapper/dists/gradle-7.5-20220113070244+0000-bin/bi5rojd82o5ohh86xxikkhdfe/gradle-7.5-20220113070244+0000-bin.zip%
IIRC I couldn't pull this off in plain bash
Here's roughly how I used it - this was so we could bootstrap Gradle and only download Gradle once. SDKMan, gng, etc might be a better choice now - this was many years ago
v
amazing
v
Or you simply run a short gradle build while building the docker image, letting the wrapper do its work. Then you also know it is properly done.
d
This was for a place where we didn't have the wrapper either, but yeah, using the wrapper jar to bootstrap from a generated properties file is probably the way to go
t
Fwiw, on CI I just use the
gradle:<version>
image from Docker hub, making sure that the version matches the one from the wrapper, and then use
gradle <tasks>
rather than
./gradlew <tasks>
; i.e. the wrapper is actually only used on developers' machines. This is because I don't need a specific JDK, Gradle distribution, or whatever, otherwise I'd probably build a Gradle image in a similar way, and use it the same, i.e. without the wrapper.
v
pretriggering the wrapper, thats so smart, thanks you all!
👌 1
@Vampire btw you mean to COPY the gradle-wrapper.jar into the image and running it?
v
Yes
v
but I need to copy the whole /gradle folder (gradle wrapper.jar, and gradle-wrapper.properties) + gradlew.sh?
v
Yes
Well, you could probably directly call the wrapper jar without the gradlew script, but it is probably easier to just copy it along