Reputation: 587
I would like to create a limited version of my Android app, excluding about a dozen class files from the final APK. Of course, I can just move them to a different folder, or use "Build Path > Exclude". I am wondering if there were a more elegant way of achieving this, via a single flag somewhere in the project. Any ideas?
Upvotes: 1
Views: 1032
Reputation: 6461
One of the ways is to use build flavors in the new gradle based build system. It is an elegant solution and recommended by Android developer site . With Build Flavors, you can share common set of files between two versions of the same app, and customize it as needed. For additional details on how to do this please see this SO question.
You can use gradle build with eclipse too, please see this and this.
Upvotes: 1