0

We have issues in our team because each developer has different folder structure so the name of project is different too. Is it possible to use some variable to automaticaly substitute the last part of .iml file name?

In following example of modules.xml, the project name is MyProject but other team members have e.g. HisProject.

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/MyProject.iml" filepath="$PROJECT_DIR$/MyProject.iml" />
      <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
    </modules>
  </component>
</project>

I have found this:

${PROJECT_NAME} - the name of the current project.

here but none of following paths does not work.

<module fileurl="file://$PROJECT_DIR$/$PROJECT_NAME$.iml" filepath="$PROJECT_DIR$/$PROJECT_NAME$.iml" />
<module fileurl="file://$PROJECT_DIR$/$PROJECT_NAME.iml" filepath="$PROJECT_DIR$/$PROJECT_NAME.iml" />
<module fileurl="file://$PROJECT_DIR$/${PROJECT_NAME}.iml" filepath="$PROJECT_DIR$/${PROJECT_NAME}.iml" />
Bhiefer
  • 1,613
  • 4
  • 16
  • 31
  • 1
    No, it's not possible. Note that the names of the .iml files do not have to be equal to the names of directories where they are stored, so the fact that every developer has different folder structure doesn't lead to the requirement for the .iml names to be different. – yole Jan 21 '16 at 15:08
  • Actually I mean that it is related to project parent folder name. When I rename the MyProject.iml to e.g. CommonProject.iml and I update the modules.xml too, the file is backward renamed to MyProject.iml becuase it is stored in /MyProject/ folder. So I need to replace it by variable OR make it unrelated... – Bhiefer Jan 21 '16 at 15:27

0 Answers0