How to update Grade version from script

Hi @tg-mbonifazi,

Thanks for asking this question here! :slight_smile:

You should never use the preinstalled gradle version, unless you really have to.

What you should do, and this is the official recommendation by Gradle, is to run every command through the gradlew wrapper which you should commit into your repository. E.g. instead of gradle assemble you should run gradlew assemble.

The gradlew gradle wrapper ensures that the right gradle version (the one you specify in your gradle project config) is downloaded, installed and used for running the command.

An additional note: if you can, you should use our Gradle steps, e.g. the Gradle Runner step, which does ensure that the commands are executed through gradlew (which means using the right gradle version) instead of through a preinstalled gradle version.

If you have any questions, just let us know!