Swap config.xml and resources with custom build

I would like to have multiple projects that share the same codebase. The only difference between them would be the name, bundle ID, icons and splash screens. The idea is to have a base project and separate directories with each subprojects’ config.xml and resources directory. What would be the best approach to swapping the config.xml and resources directory included in my base project before I build?