If you are using intellij idea, my first attempt would be to right click the project in project browser > gradle > there should be something about reimporting the project.
Alternatively, F4 on a module, then go through all modules and reconfigure the Sources tab. Don't ask me how, I haven't had...