Same source file but different source folders for different build configurations?
As per the title I would like different source code folders for different configurations - but with the same source file.
For example, imagine you have an application that could have demo mode functionality, instead of using preprocessing which can get messy one could have the following structure:
One issue is the package name. Eclipse assumes that package name for "demo-mode.java" in each folder should correspond to its folder structure, but really what we want is a package name such as:
in each of those source files. We then want to include the appropriate source file based on a build configuration of some sort.
I have seen this used before but not sure how it was done. I remember vaguely it had to do with what's included on the project classpath.
Will Eclipse be able to create/store such configurations or does this require some manual tweaking from something such as ant?
I have been searching for info on this but cant seem to find a solution, any hints would be much appreciated.