How to obtain downloaded wrapper path in build?

(Bo Zhang) #1

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.

(Tim Preston) #2

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

(Bo Zhang) #3

Thanks a lot.:slight_smile: