gradle module in non-gradle project
Answered
In my git repository I have a python project and gradle project in one of subdirectories.
Once I clone my repo (or somebody else does this) I just open repo directory in intellij.
Intellij does not import gradle project automatically, so I need to import it via:
File -> Project Structure… -> Modules -> + -> Import Module
And then everything works correctly.
As this project is cloned by a lot of people, I would like to reduce number of all required steps to configure it. Ideally it should be something like just clone and open.
What would be the best way to automate it?
Please sign in to leave a comment.
Share the project configuration in Version Control, see https://intellij-support.jetbrains.com/hc/articles/206544839.
in general I share project configuration in Version Control. As recommended in article, I do not share .iml files and .idea/modules.xml file for the Gradle or Maven based projects, since these files will be generated on import
but import in my case is a separate manual step and I want to avoid it.
when I share *.iml files, they constantly change. In most of cases those changes are user environment dependent, but not always, so I cannot ignore them.
If the project is not a pure Gradle project, but also has other modules, you will have to share the modules.xml and .iml files. There should be no user specific environment settings in the .iml files.