I have an app that needs to be built in 3 versions, where the only
differences between the versions are a few strings that need to be
compiled with the app.
One of those strings is the IP address of a server where the app needs
to send data to, so for security reasons I want this to be compiled
with the app rather than be a config file that's loaded in runtime.

I want to set up a build script that would do the following:
1)  Build my the 3 versions of the apk, based on some param file for
each version, which would state the string values that should be
compiled into it.
I am imagining that this would be implemented by having the Android
source code import a specific strings file, and the build script would
replace that file for each version before compiling it.

2)  Also generate some server-side .php files that depend on
information from the build (e.g. the php file should have the latest
version number of the Android app).

3) In the end will create 3 output directories one for each build,
which have the respective .apk file and relevant .php files

4) Another note is that currently the app supports android 1.5 up to
2.1, and I read that sometimes build commands in Ant might be
different between 1.5 and newer versions.

5) It would also be great if this mechanism could be generalizable to
more than 3 apk versions in the future

I don't know much about build scripting. I've looked around and saw
that the Android full OS uses make/android.mk files, saw some other
project that used "maven" to build android code (e.g. the "i-jetty"
project), and also saw some discussion about doing something similar
using Ant and the "build.properties" file. From what I've read, doing
this from within Eclipse is not really possible (or at least not
documented..)

What would be the recommended (and easiest) approach to set up
something like this?

Thanks!

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