Can I add project's root .gradle folder to the .gitignore file?
136
Gradle stores project-specific cache in the .gradle
folder. You can definitely ignore it without meeting any problem. Even GitHub put it in their gitignore templates: https://github.com/github/gitignore/blob/master/Gradle.gitignore.
Reference
Author by
Alex V
Updated on December 31, 2022Comments
-
Alex V over 1 year
Root folder of Flutter project has a .gradle folder. I'd like to stop tracking it and exclude it from the git index. Could you please advice whether I would meet and issues doing this? What is it responsible for? And is it critical if new developers will pull the project without this folder? I couldn't find any docs regarding this. Also I see that this folder isn't excluded by default.
-
daddygames over 2 years
./android/.gradle
is generated/updated when you build the project (e.g.flutter run
command). You can ignore it for your repo as it will get recreated on your local machine. I'm not sure about a .gradle at the root of your project or why you have one there. It could serve a completely different purpose for your app. -
Alex V over 2 years@daddygames I meant ./.gradle, not ./android/.gradle
-
-
Arne Burmeister over 2 yearsTo be more clear, you should ignore ˋ.gradleˋ