It's not advisable to split code like this. The better way is to use gradle and make it a multi-module build.
First time will take time , but each time it will only compile incrementally. Blazing fast and good management.
All of android now uses this, so this is not new