How to obtain downloaded wrapper path in build?

I’m using GradleConnector in my tests and want to assgin the current wrapper path to it with GradleConnector.useInstallation. Since I redirect gradle user home to somewhere else, if I don’t set it with
GradleConnector.useInstallation, the distribution zip will be downloaded in every test.

How to get the path in build? i.e $USER_HOME/.gradle/wrapper/dists/gradle-X.X-bin/xxxxx

Thank you very much.

I’ve used the following in an init script to fetch the path: gradle.gradleHomeDir.

1 Like

Thanks a lot.:slight_smile: