To share IDE project files with other developers, follow the guidelines below.
Default project format (.idea directory)
Directory-based. The default format used across all present-day versions of Intellij-based IDEs.
What needs to be shared:
-
All files under the .idea directory in the project root except the items that store user-specific settings:
- workspace.xml
- usage.statistics.xml
- shelf directory
- All the .iml module files (can be located in different module directories) -> applies to IntelliJ IDEA
Note that starting with version 2019.1, IntelliJ is capable of adding everything that needs sharing to Version Control automatically.
Items you need to be cautious about:
- Android artifacts that produce a signed build (will contain keystore passwords)
- In IDEA 13 and earlier, the dataSources.ids and datasources.xml files can contain database passwords. IDEA 14 solves this problem.
Items you may want to exclude from sharing:
- .iml files and .idea/modules.xml file for the Gradle or Maven based projects since these files will be generated on import
- gradle.xml file, see this discussion
- user dictionaries folder (to avoid conflicts if other developer has the same name)
- XML files under .idea/libraries in case they are generated from Gradle or Maven project
Legacy project format (.ipr/.iml/.iws files)
File-based. Outdated and not recommended for use.
- Share the project's .ipr file and all the .iml module files.
- Do not share the .iws file as it stores user specific settings.
For Git, you can use this .gitignore as the starting point.
Comments
0 comments
Please sign in to leave a comment.