From here.
When opening a Gradle project with “idea” plugin configuration in it, you can use the following commands to “generate/clear” the IDEA project files needed by IntelliJ IDEA IDE:
1 | # Generates all IDEA configuration files. |
After running the “idea” or “openIdea” command, everything is set when this project is opened in IntelliJ IDEA IDE. This is a feature I want for a long time. Before this feature, opening the Gradle project directly in IntelliJ IDEA was vever fully successful in my experience. All all kinds of problems happened: source directory was not recognized, sub-projects were not parsed and etc.
A good thing is, if you don’t want the IDEA configuration files anymore, you can just run the “gradle cleanIdea” command to clean them. Cool.