I am using Android Studio 0.4.6 and Gradle 1.10. I want to commit into git the necessary files and folders, so that anyone cloning the repository can start working with the project and will not have any issues of missing files/settings because of not commited file. Could someone point what is needed to be into VCS and what is optional.
From question: "gradle directory in an Android Studio project" I see that the gradle/ folder is good to have it, but what about .idea/, .gradle/, gradlew.bat etc... I see inside local.properties that it should not be commited, but what about everything else?
Here is my .gitignore that works perfect for me now:
/app/build .idea/workspace.xml .idea/tasks.xml .gradle local.properties
If you don't upgrade gradle often (most of us don't), it's better to commit it to VCS. And the main reason for me is to increase the build speed on the CI server. Nowadays, most of the projects are getting built and installed by CI servers, different server instance every time.
Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process, while allowing you to define flexible custom build configurations. Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app.
The button does what it says: it updates the Android Studio project model to match the contents of the Gradle build file.
You can take a look at What should be in my .gitignore for an Android Studio project?
If you use the .gitignore file from that questions you shouldn't have any problems.
I think that if you create a new project inside a git directory Android Studio will automatically create the necessary .gitignore files for your project.
EDIT: Actually it seems that my Android Studio always generates .gitignore files when I create a project.
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