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?
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.
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.
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.
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 .
It should be put under source control, as it's necessary for gradlew
to work properly.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With