title: What is the equivalent of BuildConfig in Java module? - Android
body: <p>I'm using AndroidStudio and I have the following:</p>
  
  <ul>
  <li>Main Android project: app</li>
  <li>Java Library: communication</li>
  </ul>
  
  <p>I want to set up my "communication" module's gradle file to achieve the following:</p>
  
  <ul>
  <li><p>As app module's gradle, I can setup variables for BuildConfig.java file, e.g.:</p>
  
  <pre><code>buildTypes {
      release {
          ...
          buildConfigField "String", "SERVER_URL", '"my_url"'
      }
  
      debug {
          buildConfigField "String", "SERVER_URL", '"my_url"'
      }
  }
  </code></pre></li>
  </ul>
  
  <p>and then I can use them using <code>BuildConfig.SERVER_URL</code></p>
  
  <p>The question is: How do I achieve this using a Java Library module?</p>