I am using Eclipse and have an app that has free and paid versions. For a long time, I built the 2 apps from a workspace set up as 3 Android projects:
Core (all the logic, all the resources, offering a never-deployed com.me.myapp.Main activity) Free (creates an empty subclass of com.me.myapp.Main called com.me.myapp.free.Main) Paid (creates an empty subclass of com.me.myapp.Main called com.me.myapp.paid.Main) The logic in Core, then, offered the paid and free behaviors based on simple overridden callbacks on the free and paid Main activities that were in the deployed packages. The "res" folders for Free and Paid were simple symlinks to the res folder in Core. You can see the difficulties here. There will be resources and code in all the distributables that is never used. Worse, the conditional behavior is too complex in the Core code. I want to move to a model wherein the common resources of underlying projects are available as needed, and custom resources and code introduced only where needed. I even have some Android 1.x/2.x code that cannot co-exist in a single package (I've simplified the pain in the retelling here). I have my workspace set up now as: Core (all the common logic, all the resources, offering a never- deployed com.me.myapp.Main activity) And1 (the Android1.x-only code, creates a never-deployed subclass of com.me.myapp.Main called com.me.myapp.and1.Main) And2 (the Android2.x-only code, creates a never-deployed subclass of com.me.myapp.Main called com.me.myapp.and2.Main) Free1 (creates an empty subclass of com.me.myapp.and1.Main called com.me.myapp.free1.Main) Paid1 (creates an empty subclass of com.me.myapp.and1.Main called com.me.myapp.paid1.Main) Free2 (creates an empty subclass of com.me.myapp.and2.Main called com.me.myapp.free2.Main) Paid2 (creates an empty subclass of com.me.myapp.and2.Main called com.me.myapp.paid2.Main) I am content to keep the "res" folders all synlinks to Core/res for now. But HOW do I set it up so that the 4 distributable projects build and include all the Dalvik-compatible class files generated by underlying projects? For instance: And1 will subclass and call methods on things in Core -- should the And1 project "require" the Core project? Should the And1 project add the Core project's bin folder as an "external class folder?". Should it export the "Core" project? Should it export the Core bin folder (if it is added as an external class folder?) The same sorts of questions arise for Free1 and its treatment of Core and And1. Any help is appreciated. Tony -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

