Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should you include or ignore gradle-wrapper.properties

When working on a team of android developers using gradle as your build system. Should you include gradle/wrapper/gradle-wrapper.properties in git, or should it be part of your .gitignore?

like image 600
Reid Baker Avatar asked Feb 13 '14 18:02

Reid Baker


People also ask

Should gradle wrapper be committed?

From Gradle's documentation:The scripts generated by this task are intended to be committed to your version control system. This task also generates a small gradle-wrapper. jar bootstrap JAR file and properties file which should also be committed to your VCS.

Should you commit gradle properties?

As far as I understood, the best practice for the gradle. properties is to keep it outside of version control, because team members may use it to customize builds, and it is not desirable to have them accidentally commit changes to that file.

What is the use of gradle wrapper properties?

Gradle is commonly used by developers to manage their project's build lifecycle. It's the default choice of build tool for all new Android projects. In this tutorial, we'll learn about Gradle Wrapper, an accompanying utility that makes it easier to distribute projects.

Where do gradle wrapper properties go?

The Wrapper shell script and batch file reside in the root directory of a single or multi-project Gradle build. You will need to reference the correct path to those files in case you want to execute the build from a subproject directory e.g. ../../gradlew tasks .


2 Answers

It should be put under source control, as it's necessary for gradlew to work properly.

like image 23
Peter Niederwieser Avatar answered Oct 16 '22 16:10

Peter Niederwieser


It should be included in your git repo.

By using it with gradlew, this will ensure all your developers (and your build servers!) always use the same version of Gradle. This way you know that every one is building the same exact way.

like image 105
Xavier Ducrohet Avatar answered Oct 16 '22 17:10

Xavier Ducrohet