title: AndroidStudio Gradle: how to configure buildTypes, and check for which buildType when building?
body: <p>How can I check if a buildType is debuggable in my <strong>build.gradle</strong>?</p>
  
  <p>I want to do something like:</p>
  
  <pre><code>if(debug) {
       file.write("xxxxx")
  }
  </code></pre>
  
  <p>in my build.gradle</p>
  
  <p>Also, how can I build a debug and release buildType from AndroidStudio? I don't mean from command line by typing <code>./gradlew assembleRelease</code> or <code>assembleDebug</code>, I mean from the IDE itself when you press the play button. Is this possible?</p>
  
  <p>I have buildTypes configured as such in my android block:</p>
  
  <pre><code>buildTypes {
      release {
          signingConfig signingConfigs.storeSign
          defaultConfig {
              versionCode 1100
              versionName "1.1.00"
          }
      }
      debug {
          defaultConfig {
              versionCode 1201
              versionName "1.2.01"
          }
      }
  }
  </code></pre>