title: Mercurial .hgignore for Android Studio projects
body: <p>What files should be ignored in Mercurial when using Android Studio (1.0 RC4 Windows) for development?</p>
  
  <p>Creating new application project also creates <code>.gitignore</code> file. I have translated that to following <code>.hgignore</code> file</p>
  
  <pre><code>syntax: glob
  .hgignore
  .gradle
  local.properties
  .idea/workspace.xml
  .idea/libraries
  .DS_Store
  build
  </code></pre>
  
  <p>But when I do <code>Add to VCS</code> for my project, some files that are not in ignore list are not being added to Mercurial. Files left out are:</p>
  
  <pre><code>.idea\.name
  .idea\compiler.xml
  .idea\copyright\profiles_settings.xml
  .idea\encodings.xml
  .idea\gradle.xml
  .idea\misc.xml
  .idea\modules.xml
  .idea\scopes\scope_settings.xml
  .idea\vcs.xml
  build.gradle
  MyApplication.iml
  gradle.properties
  gradle\wrapper\gradle-wrapper.jar
  gradle\wrapper\gradle-wrapper.properties
  gradlew
  gradlew.bat
  settings.gradle
  </code></pre>
  
  <p>Should I add those files to ignore list, or should I add them to VCS? </p>
  
  <p>It is also unclear what should be done with <code>.iml</code> files. Adding project to Mercurial using AS will add <code>app\app.iml</code> file, but adding project to Git using AS will leave that file untracked.  </p>
  
  <p>I don't want to track superfluous files in VCS, but I don't want to miss storing important ones. There are numerous sources on which files should be tracked, but information differs so greatly it is hard to make any definite conclusion.</p>
  
  <p><strong>Update:</strong> final version of my <code>.hgignore</code> file</p>
  
  <pre><code>syntax: glob
  .hgignore
  .gradle
  local.properties
  .idea
  .DS_Store
  build
  *.iml
  gradlew
  gradlew.bat
  </code></pre>
  
  <p>For sharing project among developers following files have to be commited to VCS or AS will not be able to import project on another machine:</p>
  
  <pre><code>gradle.properties
  gradle\wrapper\gradle-wrapper.jar
  gradle\wrapper\gradle-wrapper.properties
  </code></pre>