Thursday, February 19, 2015

Gradle tip - Always use a gradle wrapper

The wrapper sits in your project and defines a common build behaviour for all your team and CI tools. 

Why not use a local gradle installation? 
A. You will find yourself out-of-sync with other team members
B. You won't be able to run your project without pre-installing stuff (bad for CI implementations)
C. Your project build behaviour won't be tracked in git, which will cause problems going back to old revisions.

A gradle wrapper version is set in gradle-wrapper.properties - Only thing that needs to change in a gradle wrapper is the distributionUrl. It marks which gradle version should be used.