I have an Android app that's downloaded primarily from Android Market (now, Google Play). We made a few tweaks to the source and also submitted to the Amazon App Store to see what sort of traction it gets. I'm now looking for a sustainable way to develop from a common code base and yet build so that I can submit to either/both.<p>As you may know, Amazon's store has some restrictions about available APIs, and hence I'd like to conditionally remove/modify features from that version. Since Java doesn't support traditional conditional compilation, and conditionally including files in Eclipse doesn't seem trivial (is it even possible?), I wanted to ask what others are doing to solve this.<p>Admittedly, I'm no Eclipse/Java expert so feel free to school me.<p>What I'm looking for in a solution:
1) Building/debugging using Eclipse.
2) Static code files, with environment/settings toggles to control what to build.
3) No duplicate code or conditional logic in code to pick code flow at runtime<p>Is this something you've solved for Android apps specifically, or for other Java/Eclipse based projects? Suggestions for where to begin?