I created two modules in single android project, named it x and y.
now when create new module,settings.gradle add automatically this module.after that u should add this line:
dependencies { implementation( ..., .., project(":y") ) }