I'm trying to move an existing project to gradle from ant. I'm using Intellij 13, and I've managed to get one module running under gradle by deleting the iml file. However, it insists on writing an iml file that has a name that matches the directory name not the module name.
I recognize that this is probably not a problem for folks who work alone or on a single team in a large company where the IDE and version is handed down from on high. However this project involves a variety of contractors from several companies who all supply their own IDE's. Intellij's licensing model makes it impractical to supply the IDE to outside contractors because most work is done off site and there is no way to take back or de-authorize the license key once you give it out.
Since upgrading Intellij is not free, it's nearly impossible to coordinate everyone to upgrade at once and so I use the file based project format, with a project file named ourproject.ij12.ipr1
and another named ourproject.ij13.ipr
and the iml files for the module in the directory foo
are foo.ij12.iml
and foo.ij13.iml
This works great, and the policy is that everyone has until 14 comes out to get off of 12 so that we don't get an infinite number of versions going, but we don't have to synchronize our upgrades too the nanosecond either.
Unfortunately, as soon as I try to use build.gradle in the foo
directory in intellij, it writes foo.iml
which totally breaks the forgoing conventions. Furthermore, it adds another module (without asking) and that leads to two modules in the same directory and the ide won't let you change either one because two modules in the same directory are an error.
Can anyone tell me how to influence the file name that Intellij writes for the iml file when using gradle? obviously having separate directory names is not going to do it unless I get very elaborate with symlinks and ant.symlinks task, and that won't work if anyone trys to run it natively on windows.
EDIT: Since folks seem to be in the habit of deleting their unaccepted answers, let me clarify. I am aware of the gradle idea eclipse plugins. I am not asking for a guide to IDE agnosticism. I find there are things of value in IDE setups, and want to share them among others using the same IDE (where "same" includes the version, cross version sharing is not expected, but more than one version at a time is).
To be more specific, I am looking for one of these:
- A configuration or trick that allows me to control the file names of iml files
- Another way to maintain two versions of ide files, that is not too byzantine.
- Confirmation from one of the JetBrains folks who participates in SO that there is no longer a way accomplish my goal with IDEA.
EDIT2: Solutions involving gradle generating the files are not going to work. Intellij 13 changes the file name to match the directory name not the module name, which is the soruce of the problem. I need a solution that convinces Intellij not to do that. I had no problems before the upgrade to 13.