Damian Reeves
03/12/2025, 3:33 PMdistributionUrl
. I'm wondering if its possible for these users to override the distributionUrl
without setting it in the gradle-wrapper.properties
file since they would break the public build if they accidentally checked in their enterprise URL.Vampire
03/12/2025, 9:44 PMJulien Plissonneau Duquène
03/13/2025, 9:53 AM.git/info/exclude
for this project, or provide them a pre-commit
git hook script to install in .git/hooks
, though this is more about git than gradle (you could also automate or enforce this with gradle eventually)Vampire
03/13/2025, 2:57 PMDamian Reeves
03/13/2025, 5:10 PM./gradlew
shouldn't try and reach out to the public distribution url, is that correct?Vampire
03/13/2025, 9:52 PMDamian Reeves
03/13/2025, 10:19 PMJulien Plissonneau Duquène
03/13/2025, 10:31 PMthen running ./gradlew shouldn't try and reach out to the public distribution url, is that correct?as long as a distribution with the exact same download URI was already downloaded apparently, having the same version is not enough so your team may still run into issues if they never used a wrapper to download this version of Gradle from the public
<https://services.gradle.org/distributions/gradle->...
E.g. a wrapper-downloaded Gradle 8.8 will end up in ~/.gradle/wrapper/dists/gradle-8.8-bin/dl7vupf4psengwqhwktix4v1/gradle-8.8/
, where dl7...
is a hash of the download URI.
As @Vampire pointed out you can't use .gitignore
or .git/info/exclude
to ignore modifications to a file that was checked out, and using git update-index
doesn't sound like a good idea in this context. You could eventually hack something with gitattributes and a filter, but IMO the best way to deal with this if pre-downloading the public distribution is not possible would be to tell your team not to use the wrapper for this project and use instead a local installation of your private distribution of Gradle.Vampire
03/13/2025, 10:37 PMVampire
03/13/2025, 10:39 PMJulien Plissonneau Duquène
03/13/2025, 10:44 PMVampire
03/13/2025, 10:50 PMDamian Reeves
03/13/2025, 11:03 PMVampire
03/13/2025, 11:05 PMVampire
03/13/2025, 11:05 PMVampire
03/13/2025, 11:06 PMVampire
03/13/2025, 11:06 PMVampire
03/13/2025, 11:07 PMgradle
executable in the provisioned distribution instead of gradlew
and basically have the same effect.Damian Reeves
03/13/2025, 11:08 PM