Hi Shane,
Glad to see you're back! The SAM client is starting to look really
good :)
I recognize your use case for building an application in many
different variants, using different resources etc... I have been in
this situation a few times, and there is one specific case where you
can make life a little easier on yourself (depending on how you view
it).
If your application is the type of application which requires a
network connection to be useful at all (which I believe for example
SAM is), then you could make the client as dumb as possible, and serve
all localized and customized resources from a server, which the client
always would connect to as the first thing when starting. This also
gives you the benefit of being able to update some aspects of the
application without installing a new apk. I think you are already
doing this in part, with the images and URLs for the featured
applications on the first menu screen of SAM(?). One drawback of doing
this for all resources is that you would have to implement your own
resource bundle manager, and can't use R.java lookups for localized
resources.
On the other hand...
For applications where you really need to create different apk's with
different resources, I would think the best way to set it up likely
depends on the number of combinations you require. In any case, I
would go for a setup which eliminates (or at least minimizes) source
code and resource duplication across modules. That would be through
having one module compiled to a jar which contains the actual
application source code, and one module for each different resource
package. Then either one of these alternatives for building the apk's
from that:
Either:
1. One module for each apk, which would depend on the source code jar
and the correct combination of resource packages required for that
apk.
2. OR, Only one module like above (not one for each apk), and instead
of depending on specific resource packages, it would depend on for
example a language package and a graphics package with ${parameters} $
{like} ${this} for groupids and artifactids. Then you could build that
pom a number of times, with the different required dependencies as
parameters for each. With Matrix build in Hudson,
https://hudson.dev.java.net
, you could set that up to build lots of those combinations easily.
From what you just wrote about how unmanageable the combinations are
becoming, I would guess you are already doing something like
alternative number 1 above?
Any practical experiences from your work so far, or just thoughts on
building stuff like these, you would like to share with us?
/Hugo