Have you tried building multi module project. Even I never tried. It was just random thought to try it out.
As always I couldn’t get time to do the write up for this. But I have made sure code is as simple as possible and understandable. I will make sure to add a readme for the project very soon.
Checkout the code on Github