Why sometimes new projects have both an .idea/ folder and an .iml file, but other times they only have an .idea/ folder? How to prevent creation of .iml files?

Answered

I prefer my IDEA projects to only have the `.idea/` folder for storing project settings.

But sometimes when I create a new project or import a project, IDEA creates both the `.idea/` folder and an `.iml` file.

Is there a way to disable `.iml` files IDE-wide?

4 comments
Comment actions Permalink

Also please support Markdown in the forums.

0
Comment actions Permalink

For Gradle/Maven projects there is an option to store the generated project files externally.

Forum is a third-party product and we've asked them to add Markdown support many times, but it's still not possible: https://support.zendesk.com/hc/en-us/community/posts/203848377-Markdown-support-in-Community .

 

0
Comment actions Permalink

Serge,

That option is not available when I import a project:

Right after pressing Finish, IDEA opens the project and creates the .iml files.

0
Comment actions Permalink

I was referring to this option:

It's the default in the current version.

See https://www.jetbrains.com/help/idea/2019.1/gradle-settings.html

Store generated project files externally.
By default, this option is selected and a newly created or imported project is stored externally. That means that generated iml and library files are stored in idea.system.path instead of the .idea directory. It might be helpful for sharing your project via version control.

0

Please sign in to leave a comment.