title: Environment variable in settings.gradle not working with Android Studio
body: <p>I do have a multi-module project with a library project in a different root path. As illustration you can imagine something like this:</p>
  
  <pre><code>/projects_home/projects/app_root
     |--app/
     |   |--build.gradle
     |--build.gradle
     |--settings.gradle
  
  /libraries_home/libraries
     |--libA
         |--build.gradle
  </code></pre>
  
  <p>In my settings.gradle file I am able to set the absolute path to the library project utilizing the projectDir attribute. This works just fine within the console as well as with Android Studio. </p>
  
  <p>But if I try to use an environment variable it stops working with Android Studio. The settings.gradle for the example above would look like this:</p>
  
  <pre><code>include ':app'
  include ':libA'
  
  project(':libA').projectDir = new File("$System.env.LIB_ROOT", '/libraries/libA')
  </code></pre>
  
  <p>If I build with the graddle wrapper from the console, it still works. But AS stops working with the following error msg:</p>
  
  <pre><code>Gradle 'app' project refresh failed:
  Configuration with name 'default' not found.
  </code></pre>
  
  <p>If I unset the environment variable, the build on console fails with the same msg:</p>
  
  <pre><code>* What went wrong:
  A problem occurred configuring project ':app'.
  &gt; Configuration with name 'default' not found.
  </code></pre>
  
  <p>Therefore I guess that AS is somehow not be able to access the environment variables set with my ~/.bashrc</p>
  
  <p>Does somebody of you maybe know a way how I can make AS aware of my environment?</p>