Can / Should I add kotlinc.xml to my version control ignore file?
I have never submitted anything from .idea
directory.
If you use modern build system like Gradle or Maven there is no need to submit such metafiles because IDEs like Intellij IDEA or Eclipse can successfully extract such metadata from dependencies / properties.
Mostly, IntelliJ will ask you to override existing properties in .idea
folder.
After importing Gradle / Maven project IntelliJ creates its own .idea
directory with configurations and properties.
I prefer to keep my project as clean as possible (sources, build (gradle, maven) files, CI, README). Fortunately, Java allows us to make portable sources / projects so we should not waste this chance :)
You should not add this file to your version control ignore file. We have this file checked in, as it contained relevant JVM target information. This is in line with the official Jetbrains sharing recommendation, which states:
Here is what you need to share:
- All the files under the .idea directory [...]
kotlinc.xml is not stated as an exception to this rule.
Additionally, the gitignore templates from github and gitignore.io do not list this file, so it should be checked in.