This is a java agent for Gradle distributionUrl
property global mirror setting.
-
Download the agent jar here
-
edit the system environment variable like this:
GRADLE_OPTS = -javaagent:C:\path\to\GradleAgent.jar=https://www.mirrror.host.com/gradle/gradle-%1$s-%2$s.zip
%1$s
will be fill with the gradle version info, like8.8
;%2$s
will be filled with distribution type, likeall
bin
. -
edit JetBrains IDE VM Options(optional, support for JetBrains IDE)
follow the documentation, then append new line with:
-javaagent:C:\path\to\GradleAgent.jar=https://www.mirrror.host.com/gradle/gradle-%1$s-%2$s.zip
-
restart terminal or JetBrains IDE
make configuration effect now!
-
sync Gradle and observe the output of Gradle.
if you never use this version of Gradle, you should see it download the Gradle distribution from the mirror website.