Ok, I've tried the 'shell script' approach.

First, I tried to just manually adjust my project. So:

- I changed the value of 1 constant in my code which determines if it
builds into a lite or a full version
- I changed android:icon , android:label and 'package' in the manifest
- this forced me to change the 'package' in every single source file
- this in turn forced me to change the name of the directory which
contain said source code

now I closed and reopened the project in Eclipse, it gave me some
cryptic errors, I restarted Eclipse, that did the trick. Now I have
two .apk's .

The problem is, I can of course automate the first 4 steps, but I
still don't quite understand how to automate re-importing thus
adjusted code into Eclipse. Seems to me this approach will prove to be
too much trouble.

'android library' - looks promising, although I already have
everything organised in such a way that all I have to do is change the
value of one constant in the code and everything else automatically
rebuilds into the proper version. So what exactly would I put in my
two 'lite' anf 'full' projects? 100% of the code would be in the
library.

L.

On Dec 19, 8:56 pm, Mark Murphy <[email protected]> wrote:
> Use an Android library project:
>
> http://developer.android.com/guide/developing/eclipse-adt.html#librar...
>
> It will not get down quite to the level you seek, but fairly close.
>
> Or, write yourself a shell script/Java program/Ruby program/whatever
> to clone the project and apply your changes.
>
>
>
> On Sun, Dec 19, 2010 at 7:16 AM, Utumno <[email protected]> wrote:
> > Hello Android gurus,
>
> > I would like to build 2 versions ( free and paid ) of my app from the
> > same source. Both should be installable at the same time.
>
> > Here's (hopefully) the full list of differences between the two:
>
> > - android:icon
> > - android:label
> > - value of one constant in the code
> > - and since both should be simultaneously installable, I guess I will
> > need to change the namespace, too.
>
> > What do you recommend? Any automatic solutions to this ( I guess
> > fairly common ) problem?
>
> > I am aware of custom Ant scripts ( like in
> >http://java.dzone.com/articles/building-two-versions-same) however,
> > any way to configure it in Eclipse?
>
> > --
> > 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
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> Available!

-- 
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

Reply via email to