I have a grails application on my local machine and I have created a repository in XP-DEV. I have the folders .groovy
and .settings
in project root. Do I need to commit those files into version control? I am asking this question because I have no idea what the use is of these folders.
Update
5 years of development experience later and I think I need to walk back my original opinion slightly. I still think that in general, these files should not be included in source control.
However, there are certain settings that are convenient to share between developers. The problem is that it is very hard to know which settings to share and which ones to not share. For example, any settings with absolute paths in it should not be shared; but how do you know if any given tool's configuration (e.g. Eclipse, IntelliJ, etc...) contain absolute paths?
If you are using git for version control, github publishes a lot of .gitignore
templates for various tools github/gitignore. If you want to try sharing settings, I recommend using one of these templates.
If those templates do not work for you, I stand by my original recommendation of not checking these settings in to version control and allowing them to be generated automatically. Then, if there is important settings to share (like a codestyle template or some such) provide instructions on how to apply that setting for all expected development environments.
Original Answer:
.settings
is generally created by whatever IDE you are using (I know Eclipse uses this convention) and contains project-specific settings with respect to the IDE.
.groovy
contains user-specific settings for groovy. For example, I know Grape downloads dependencies into the .groovy directory.
My opinion is, no do not commit these directories. If another person checks out your project their own personal copies of these directories will be generated automatically.
I disagree with the answer from @FGreg. The .settings folder contains project specific settings. This includes custom compiler settings, errors and warning levels, formatting preferences, save actions, etc. In general, it's a good idea to share these preferences across developers. If these settings are not shared, then you could get inconsistencies in formatting and compiler problems.
In general, if you want a consistent development environment for any team, you will need to include the settings folders into version control.
The .groovy folder inside of Groovy-Eclipse is used for project-specific DSL information and inferencing suggestions. In general, if you have project-specific inferencing information, you will want to share this with others on the same project.
In our team, we clearly define all the settings that will be used by each project, commit the .settings folders and we are assured that every developer sees the same settings.
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