My solution was to create two different starter classes with different packages. One for the paid version and the other for the free version. Since the package name is used to identify the application in the market. You can use this to customize the app, by setting properties in the different start classes. I modified the generated Ant file to switch between the paid/free versions. I created a task that uses regular expression replacements, identifying sections and replacing the starting class name depending on what I am deploying in the manifest. You can even modify the XML layouts using this method. Essentially pre-processing prior to compilation. The R class is the only issue, you need to make sure you include an * import for both packages otherwise it won't work, and you will have to modify code each time. Also, Eclipse gets upset when you change things underneath it after compiling the R class, you need to delete the generated source directory. This is the best solution I have come up with so far, it's not great but it works for me and it is scripted.
Alex On May 4, 3:01 pm, Tomáš Hubálek <tom.huba...@gmail.com> wrote: > I'm thinking about the same thing. > > I believe thathttp://code.google.com/p/maven-android-plugin/could be > a solution. Maven is very powerful tool for building (we are using it > for JEE projects) so I'm sure that it will support also multiple APKs > from one source code base. > > But I didn't looked into details yet. > > Tom > > On 4 kvě, 20:37, "E.P" <eld...@gmail.com> wrote: > > > > > Are there any viable approaches for creating multiple .APKs out of a > > single codebase? > > > The apps may share the same code, but they could have different > > manifest files, different resources, or different external libraries > > (for example in an app with both free and paid versions, the free > > version could have a library for display ads). > > > Ideally, this would be a single Eclipse project, with a way to specify > > which app to build/debug, and possibly a command line way to batch > > build everything. > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group > > athttp://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en