Search code examples
androidgitgradleversion-controlgitignore

Android Studio project's Git repository


In my project I have settings.gradle, gradle.properties and gradle-wrapper.properties files. Which of them should be checked in a Git repository?


Solution

  • All of those files should be commited as they all contain information critical to the build environment for the project.

    The one exception would be if you needed to create a local.properties file to override or supplement those files on your computer specifically. The Configure your build section of Android Developer site has more information.

    Additionally, when in doubt a good rule of thumb is to use a tool like gitignore.io to generate a Git gitignore file. It generally contains sane default rules on which files should be excluded from source control (and thus included).