First To make the code more reusable. By packing into different project functionality, itβs easier to find the functionality that you want to transfer to another project (in this case, you could export the entire IngotAPI to a new project). The second is for testing. It is much easier to save the test result when each project has its own unit test, rather than a test that checks the integration between the two projects.
For example, if IngotAPI is well developed, it should not have any dependencies on the Ingot project. This means that if you make any changes to the Ingot project, you do not need to test IngotAPI yourself, since it will not be affected (high cohesion), you just need to check the ingots, but in the place where the ingot uses IngotAPI.
source share