title: Differentiating debug and production build of an Android app
body: <p>I recently started learning about Android app development. It's also my first experience with the Java language.</p>
  
  <p>There are some debugging tools that I want to incorporate into my app development in a form of Java package dependency. For obvious reasons, I would like to include it only for debug builds.</p>
  
  <p>In iOS, we can use build configuration to link with debugging libraries only for debug builds, and use macros to remove parts of code that deals with debugging. This makes it really easy to switch between debug and production builds. Anyway to achieve the same for Android?</p>
  
  <p>So far, the closest I got is using Maven profiles to overwrite properties files, which gets loaded by the application, but this requires that the debugging libraries are still imported. </p>
  
  <hr>
  
  <p>To clarify my question, here is what I want to do:
  I built a library that will let you browse the SQLite database on your browser. It's really useful for debugging purposes, but I don't want to ship my app with the library.</p>
  
  <p>Another purpose is to use HockeyApp. HockeyApp provides two features: Update notification, and crash reporting. I need three different builds for this to work:</p>
  
  <ul>
  <li>Production: Crash reporting On, Update notification Off</li>
  <li>Beta: Both On</li>
  <li>Debug: Both Off</li>
  </ul>