title: Android gradle build System.getEnv("RELEASE_PASSWORD") returns null
body: <p>I'm having an issues where System.getenv() is returning null for the environment variable. My password is stored in the <em>RELEASE_PASSWORD</em> environment variable. When I do:</p>
  
  <p><code>$ echo $RELEASE_PASSWORD</code></p>
  
  <p>it prints out the correct value, so I know the variable is set.</p>
  
  <p>I was originally setting the <code>signingConfig signingConfigs.release</code> in the <em>release</em> buildType and everything was working fine, but I need different signing configs for different product flavors. If I hardcode the password, it works just like it is suppose to. Things only get wonky when I try to read the password from an environment variable.</p>
  
  <p>Is it some sort of scope issue?</p>
  
  <p>This is what I currently have in my <code>build.gradle</code>.</p>
  
  <pre><code>android {
  
    ...
  
    signingConfigs {
      release {
        storeFile ...;
        keyAlias ...;
        storePassword System.getenv("RELEASE_PASSWORD");
        keyPassword System.getenv("RELEASE_PASSWORD");
      }
  
      unsigned {
        keyAlias "";
        storePassword "";
        keyPassword "";
      }
    }
  
    buildTypes {
      debug {
        versionNameSuffix = "-DEBUG"
      }
  
      release {
      }
    }
  
    flavorGroups "storeFront"
  
    productFlavors {
      def googleVariable = signingConfigs.release
      def amazonVariable = signingConfigs.unsigned
  
      google {
          flavorGroup "storeFront"
          signingConfig googleVariable
      }
  
      amazon {
          flavorGroup "storeFront"
          signingConfig amazonVariable
      }
    }
  }
  </code></pre>