title: Android - use ant to create build configurations that change configuration values
body: <p>What I want is a way to have settings that are dependent on build configuration.  To give a specific example, my android application connects to a web service.  In development, I want the service url to be pulled in from a configurable value.  In Test, I want a different value pulled in.  In production, yet another value.</p>
  
  <p>So, in code I have something like this:</p>
  
  <pre><code>public class HttpRequestHelper 
  {
      private static String GetServiceUrl(ServiceAction action)
      {
          return serviceUrl + action.toString();
      }
  }
  </code></pre>
  
  <p>By default (when debugging/running through eclipse), I want that url to be <a href="http://localhost:1234" rel="noreferrer">http://localhost:1234</a></p>
  
  <p>In Test I want <a href="https://test.mydomain.com" rel="noreferrer">https://test.mydomain.com</a></p>
  
  <p>In Production I want <a href="https://mydomain.com" rel="noreferrer">https://mydomain.com</a></p>
  
  <p>I am new to eclipse and ant and it has been a long time since I used java.  How do I go about setting this up?  What should the build.xml look like?  I understand that when I want to build the test/prod versions I will need to use the command line.  That's okay.  But I don't know how to get this serviceUrl auto-set dependent on the build.  I'm not even sure the best place to put this information (a resource, a properties file?).  I really want to avoid setting it, building, setting it, building, etc.</p>