Reputation: 8116
I have an off the shelf application that ships a version of gradle with it. It also has scripts that are hard coded to set GRADLE_HOME to this location.
I want to zip up this dir, put it in nexus and replace it with the gradle wrapper.
How do I configure the gradle wrapper to download this zip from nexus and extract it to a specific location in the project?
EDIT: In the gradle-wrapper.properties I have
distributionPath=wrapper/gradle
However, I end up with it being unzipped to
...\wrapper\gradle\gradle-2.3-bin\8gn7esgljqyucijpbynjk93oc\gradle-2.3
How do I get it to unzip to the path I specified and not to the subdirs?
Upvotes: 3
Views: 1464
Reputation: 13466
The location to which Gradle gets unpacked is a combination of the distributionBase
and distributionPath
properties in gradle-wrapper.properties
file.
The location specified by distributionPath
will always be considered as relative to distributionBase
. The only available values for distributionPath
are GRADLE_USER_HOME
and PROJECT
. Even when using PROJECT
the wrapper will still generate the folder structure you see above.
If you want to control this more precisely I'd suggest not relying on the wrapper to do this and instead add a task to your build specifically for this purpose.
Upvotes: 3