How do I get the Idea/Intellij project generator to generate the iws file with the correct name? There is no property on the IdeaWorkspace model to set the outputFile, and it does not seem to inherit the value set on the IdeaProject model.
Also, how do I suppress the generation of an .iml for the top level project directory? There shouldn’t be one there.
Name of workspace file is derived from project name as you can see in https://github.com/gradle/gradle/blob/6322d6fe0c263196234a4deed2a08ba9f6cba641/subprojects/ide/src/main/groovy/org/gradle/plugins/ide/idea/IdeaPlugin.groovy#L86
If you want to make it customizable it would be a nice patch.
What makes you think there should not be a module for root Gradle project?
It looks like an oversight that the IdeaWorkspace model does not inherit the stem of the IdeaProject model’s outputFile, or have it’s own outputFile property. It appears the GenerateIdeaWorkspace task has a property for the outputFile, but I do not have enough gradle foo to figure out how to set it (and I’ve tried various things to no avail).
Generating an .iml file for the root of the project causes intellij to put the other modules within that module, rather than being peers of one another. There is no code at the root level.
outputFile customization for IdeaWorkspace wasn’t a priority so far.
I think it is possible to close the module related to root project. It should not cause any harm if there is no code there. There is no hierarchy of modules as far as I know. Or is there some problem that I am missing?