title: How can I get the "current" build type in build.gradle file?
body: <p>I want to do something like this:</p>
  
  <pre><code> productFlavors {
          favor1 {
              buildConfigField 'String', 'SERVICE_URL', BuildConfig.BUILD_TYPE.equals("test") ?
                      '"oneThing"' :
                      '"anotherThing"'
          }
          //more flavors
  }
  </code></pre>
  
  <p>But obviously I get an error when <code>BuildConfig.BUILD_TYPE.equals("test") ?</code>. Is there a way to do this?</p>