1

Whenever I gradle build my Spring app in IntelliJ, compiler.xml gets modified and shows up in my git status.

Is it safe to put compiler.xml file in .gitignore with the other .idea/ files?

Raj
  • 3,637
  • 8
  • 29
  • 52

2 Answers2

0

Correct me if I'm wrong, but I think it's all good. You can probably put .idea/* in .gitignore. I am currently working on a project in uni and we've had some startup issues with .idea/compiler.xml being changed back and forth, and I think it was because someone used java 11 when the rest of us used java 12. So be mindfull about that.

Oddie
  • 1
  • 1
0

Here's the official support page: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems

And the jetbrains ignore starting point file. https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore Where they state the following:

# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn.  Uncomment if using
# .idea/compiler.xml

So, yeah, it should be ok to ignore compile.xml. But you should NOT ignore the whole .idea folder.

da Rocha Pires
  • 2,443
  • 1
  • 24
  • 19