title: Is it possible to pass Java String Constants to Gradle file?
body: <p>I'm using <code>buildConfigField</code> to pass debug and release server Ip and other string literals into app.</p>
  
  <p>like this:</p>
  
  <pre><code> buildTypes {
          debug {
              buildConfigField "String", "url", "\"http:\\xxxxxxx.xx\""
          }
  
          release {
              buildConfigField "String", "url", "\"http:\\ppppppp.xx\""
          }
      }
  </code></pre>
  
  <p>But i'm having an issue that My app can communicate with multiple test servers when debug mode. Some times I point it to my local network Ip and  if i'm not in workplace, I point it to a remote test server.</p>
  
  <p>The issue that i'm facing right now is that I have to Type entire IP address here whenever I wanted to change configuration :</p>
  
  <pre><code> debug {
       buildConfigField "String", "url", "\"http:\\xxxxxxx.xx\""
   }
  </code></pre>
  
  <p>I have a Kotlin file with these Ip address already defined:</p>
  
  <pre><code>object API {
      const val URL_MAIN = "http://19.544...."
      const val URL_TEST_LOCAL = "http://192.16...."
      const val URL_TEST_REMOTE = "http://19.554...."
  }
  </code></pre>
  
  <p>Is there anyway to access this variable through gradle file instead of typing it.</p>
  
  <p>Edit: 
  <strong>I put these urls in Kotlin class because I need to use it's values within my project too.</strong> </p>