title: Why did Gradle change my module path from relative to absolute?
body: <p>So I just checked out an Android project a colleague of mine checked in where <code>gradle.xml</code> was set up with realtive paths in the <code>modules</code> section though the use of <code>$MODULE_DIR$</code>. When I built, Gradle changed that path to absolute. Why? How can I make Gradle continue using relative paths? Or should <code>gradle.xml</code> not be included in source control? The changes are also reflected to the <code>.iml</code> files in IntellIJ, which I presume are generated by Gradle based on <code>gradle.xml</code>. Correct?</p>
  
  <p><strong>Before:</strong></p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project version="4"&gt;
    &lt;component name="GradleSettings"&gt;
      &lt;option name="linkedExternalProjectsSettings"&gt;
        &lt;GradleProjectSettings&gt;
          &lt;option name="distributionType" value="DEFAULT_WRAPPED" /&gt;
          &lt;option name="externalProjectPath" value="$PROJECT_DIR$" /&gt;
          &lt;option name="gradleHome" 
                  value="$USER_HOME$/.gradle/wrapper/dists/gradle-1.11-all" /&gt;
          &lt;option name="modules"&gt;
            &lt;set&gt;
              &lt;option value="$PROJECT_DIR$" /&gt;
              &lt;option value="$PROJECT_DIR$/SubModule" /&gt;
            &lt;/set&gt;
          &lt;/option&gt;
        &lt;/GradleProjectSettings&gt;
      &lt;/option&gt;
    &lt;/component&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>After</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project version="4"&gt;
    &lt;component name="GradleSettings"&gt;
      &lt;option name="linkedExternalProjectsSettings"&gt;
        &lt;GradleProjectSettings&gt;
          &lt;option name="distributionType" value="DEFAULT_WRAPPED" /&gt;
          &lt;option name="externalProjectPath" value="$PROJECT_DIR$" /&gt;
          &lt;option name="gradleHome" 
                  value="$USER_HOME$/.gradle/wrapper/dists/gradle-1.11-all" /&gt;
          &lt;option name="modules"&gt;
            &lt;set&gt;
              &lt;option value="C:\coding\source\work\ProjectX" /&gt;
              &lt;option value="C:\coding\source\work\ProjectX\SubModule" /&gt;
            &lt;/set&gt;
          &lt;/option&gt;
        &lt;/GradleProjectSettings&gt;
      &lt;/option&gt;
    &lt;/component&gt;
  &lt;/project&gt;
  </code></pre>