Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

add .idea/libraries to .gitignore with Android Studio (and Gradle) a good idea?

With the change to the Gradle build system, I've noticed a bunch of *.xml files added to the .idea/libraries project directory. I'd assume this is how Android Studio/IntelliJ links libraries to the project.

Is it ok/recommended to add .idea/libraries to .gitignore? Since gradle handles all dependencies, I'd think either way these would be added/overwritten. Hoping for some confirmation.

like image 354
loeschg Avatar asked Oct 30 '13 16:10

loeschg


People also ask

Where to put gitignore file in Android project?

.gitignore file must be in the root directory of the project not just in android projects but in any project types Well I had bad explained my problem. When I download this file from gitIgnore service what exactly should I do after that?

How do I import a Gradle library into Android Studio?

Just click‚ synch the project with Gradle. Your library should be available for your project. Click on “ Import Existing Project “. Step 2: Select the desired library and the desired module. Then click finish. Android Studio will import the library into your project and will sync Gradle files.

Does Gradle create Jar/War/EAR files?

It also creates jar/war/ear files for various web and Android applications. The java Gradle project includes XML, java, and JSP source code that commits to svn and git repositories. Gitignore is a file that includes a list of files or directories that ignores when committing to remote repositories in Java projects.

What is Gradle project in Java?

Gradle is a Java project build tool that allows you to compile, build, manage dependencies, and deploy your projects. It also creates jar/war/ear files for various web and Android applications. The java Gradle project includes XML, java, and JSP source code that commits to svn and git repositories.


1 Answers

Yes, why not. I've been ignoring the whole .idea directory in my .gitignore, to avoid unnecessary changes get into the repo. Those IDE configurations can be regenerated from Gradle files.

like image 161
huy.nguyen Avatar answered Sep 19 '22 16:09

huy.nguyen