Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Gradle Integration: Invoke Gradle vs. Use Gradle Wrapper options

Tags:

gradle

jenkins

I've just started to use Jenkins for CI with Gradle build tool for my project.

I found Building a Continuous Delivery pipeline with Gradle and Jenkins and I do not understand reasons why the author advices to "Always use the Wrapper!" (c) on no. 120 slide. Why this is better than directly involving Gradle?

like image 748
zubactik Avatar asked Nov 21 '14 15:11

zubactik


1 Answers

If you use the Gradle wrapper, it's easier to support different versions of Gradle and makes it easier for someone to start out with your project. They can clone your project, run 'gradlew' and get the correct version of Gradle installed.

If your organization wants to add custom configuration (e.g., init Gradle scripts), you can also control that through the Gradle wrapper.

If you don't use the wrapper, you have to make sure your Jenkins server is setup with the correct distribution of Gradle. That's not impossible, but it ties your builds to a particular build environment.

like image 66
bigguy Avatar answered Sep 18 '22 17:09

bigguy