Monday, January 25, 2016

What is iml file in the android studio?

What are iml files in Android Studio project?

Let's me see the iml file:


<?xml version="1.0" encoding="UTF-8"?><module external.linked.project.id="MSERentAgent" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">  <component name="FacetManager">    <facet type="java-gradle" name="Java-Gradle">      <configuration>        <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />        <option name="BUILDABLE" value="false" />      </configuration>    </facet>  </component>  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="true">    <exclude-output />    <content url="file://$MODULE_DIR$">      <excludeFolder url="file://$MODULE_DIR$/.gradle" />    </content>    <orderEntry type="jdk" jdkName="Android API 17 Platform" jdkType="Android SDK" />    <orderEntry type="sourceFolder" forTests="false" />  </component></module>


IML is a module file created by IntelliJ IDEA, an IDE used to develop Java applications. It stores information about a development module, which may be a Java, Plugin, Android, or Maven component; saves the module paths, dependencies, and other settings.

why not to use gradle scripts to integrate with external modules that you add to your project.
You do "use gradle scripts to integrate with external modules", or your own modules.

However, Gradle is not IntelliJ IDEA's native project model — that is separate, held in .iml files and the metadata in .idea/ directories. In Android Studio, that stuff is largely generated out of the Gradle build scripts, which is why you are sometimes prompted to "sync project with Gradle files" when you change files like build.gradle. This is also why you don't bother putting .iml files or .idea/ in version control, as their contents will be regenerated.

If I have a team that work in different IDE's like Eclipse and AS how to make project IDE agnostic?
To a large extent, you can't.

You are welcome to have an Android project that uses the Eclipse-style directory structure (e.g., resources and manifest in the project root directory). You can teach Gradle, via build.gradle, how to find files in that structure. However, other metadata (compileSdkVersion, dependencies, etc.) will not be nearly as easily replicated.

Other alternatives include:

Move everybody over to another build system, like Maven, that is equally integrated (or not, depending upon your perspective) to both Eclipse and Android Studio

Hope that Andmore takes off soon, so that perhaps you can have an Eclipse IDE that can build Android projects from Gradle build scripts


Have everyone use one IDE



refence:

http://stackoverflow.com/questions/30737082/what-are-iml-files-in-android-studio

No comments:

Post a Comment