Reputation: 6296
I'm ussing the usual way to link android studio modules to a project:
include ':app'
include ':coretools'
project(':coretools').projectDir = new File(settingsDir, '../base/CoreTools/app')
This works as expected but the problem is that this generates a coretools.iml file in the used module folder. I mean, in the above example a coretools.iml is generated under base/CoreTools/app.
The main concern is that this coretools.iml generated file has references to the project that used this module and it is a nightmare to use the module in different projects by different users with a CVS like git.
The question is: Is there any way to avoid this .iml creation? Is this "as designed" and can't be avoided?
Thanks
Upvotes: 0
Views: 87
Reputation: 6296
I finally ended just ignoring all *.iml in the library module but the one belonging go the module. Something like this in the .ignore file did it:
*.iml
!app.iml
being the app.iml the real/original module iml file.
Cheers.
Upvotes: 0
Reputation: 1953
Please refer to the module documentation:
A module is a discrete unit of functionality which you can compile, run, test and debug independently.
Modules contain everything that is required for their specific tasks: source code, build scripts, unit tests, deployment descriptors, and documentation. However, modules exist and are functional only in the context of a project.
Configuration information for a module is stored in a .iml module file. By default, such a file is located in the module's content root folder.
Development teams, normally, share the .iml module files through version control.
As you can see there is a lot of useful project-related information in the .iml files but the documentation doesn't state that you always must share those files though a CVS. If the .iml files are a pain for your development team just add them to your .gitignore file.
Upvotes: 1