This is primarily a design problem. Since you stated that the project already has a large amount of code, one approach would be to analyze the UML diagram for the entire project structure. The goal is to identify areas of architecture where interactions are closely related between several classes, groups can also be formed based on which classes have the same external dependencies.
With this approach, you reduce the complexity of a large project, de-link classes from external dependencies that they do not use in a large project. The invisible modules into which you split the project will have faster build times. The modules into which you divided the project can be indicated as dependencies in the main project. An additional advantage is that only modified modules in the main project will be rebuilt with each change.
This post discusses the many plugins of the UML diagram generator for Android Studio. Iris code is a good option that you can install through the menu of the Android Studio plugin. An example is the output of Code Iris for an example of FaceTracker application for Android (click on the diagram to enlarge):

The diagram shows the grouping of packages and projects. You can see that different projects are divided into separate green fields, in these boxes are boxes for packages, and then, finally, classes and interactions. By analyzing UML, you can first determine how best to group your classes and create separate projects. After dividing the main project into modules, you can again use Code Iris to visualize interactions after making changes to the structure.
sparkplug
source share